Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Google Apps Script 座席検索機能追加コード
/*!
* Google Apps Script 座席検索機能追加コード
* (c) iwb.jp
* Released under the MIT License.
*/
var _0x1580=['pink','flush','getUi','createMenu','座席検索','addItem','search','addToUi','getActiveSpreadsheet','getActiveSheet','getRange','getValues','prompt','名前を検索','ButtonSet','OK_CANCEL','getResponseText','replace','filter','length','indexOf','push','\u3000座席:\x20','getA1Notation','msgBox','join','forEach','getBackground','setBackground'];(function(_0x3eacd6,_0x21760b){var _0xb563a3=function(_0x271a27){while(--_0x271a27){_0x3eacd6['push'](_0x3eacd6['shift']());}};_0xb563a3(++_0x21760b);}(_0x1580,0xea));var _0x4b37=function(_0x451903,_0x13ea7a){_0x451903=_0x451903-0x0;var _0x15c634=_0x1580[_0x451903];return _0x15c634;};function onOpen(){var _0x1de2ad=SpreadsheetApp[_0x4b37('0x0')]()[_0x4b37('0x1')](_0x4b37('0x2'));_0x1de2ad[_0x4b37('0x3')]('実行',_0x4b37('0x4'));_0x1de2ad[_0x4b37('0x5')]();}function search(){var _0x224db0=SpreadsheetApp[_0x4b37('0x6')](),_0x43a33d=_0x224db0[_0x4b37('0x7')](),_0x408212=_0x224db0['getSheetByName']('data');_0x224db0=_0x43a33d[_0x4b37('0x8')](0x1,0x1,0x64,0x64)[_0x4b37('0x9')]();var _0x2ab234=SpreadsheetApp[_0x4b37('0x0')]();_0x2ab234=_0x2ab234[_0x4b37('0xa')](_0x4b37('0xb'),_0x2ab234[_0x4b37('0xc')][_0x4b37('0xd')])[_0x4b37('0xe')]()[_0x4b37('0xf')](/(.+)@.+/,'$1')[_0x4b37('0xf')](/[\s\t\n\r@\u3000]/g,'')['trim']();var _0x397bed=_0x408212[_0x4b37('0x8')](0x1,0x1,0x3e8,0x2)[_0x4b37('0x9')]()[_0x4b37('0x10')](function(_0x408212){return _0x408212[0x0];});for(_0x408212=0x0;_0x408212<_0x397bed[_0x4b37('0x11')];_0x408212++)~_0x2ab234[_0x4b37('0x12')](_0x397bed[_0x408212][0x1])&&(_0x2ab234=_0x397bed[_0x408212][0x0]);_0x397bed=[];var _0x4caa3a=[],_0x1d5c51=0x0;for(_0x408212=0x0;0x64>_0x408212;_0x408212++)for(var _0x2e1687=0x0;0x64>_0x2e1687;_0x2e1687++){var _0x535e33=String(_0x224db0[_0x408212][_0x2e1687])[_0x4b37('0xf')](/[\s\t\n\r@\u3000]/g,'')['trim'](),_0x58756e=_0x408212,_0x55c71f=_0x2e1687;~_0x535e33[_0x4b37('0x12')](_0x2ab234)&&(_0x397bed[_0x4b37('0x13')](_0x535e33+_0x4b37('0x14')+_0x43a33d['getRange'](++_0x58756e,++_0x55c71f)[_0x4b37('0x15')]())+'\x5cn',_0x1d5c51++,_0x4caa3a['push'](_0x43a33d['getRange'](_0x58756e,_0x55c71f)));}_0x1d5c51?(Browser[_0x4b37('0x16')](_0x397bed[_0x4b37('0x17')]('\x5cn')),_0x4caa3a[_0x4b37('0x18')](function(_0x408212){for(var _0x224db0=_0x408212[_0x4b37('0x19')](),_0x2ab234=0x0;0xa>_0x2ab234;_0x2ab234++)0x0==_0x2ab234%0x2?_0x408212[_0x4b37('0x1a')](_0x4b37('0x1b')):_0x408212[_0x4b37('0x1a')](_0x224db0),SpreadsheetApp[_0x4b37('0x1c')](),Utilities['sleep'](0xc8);})):Browser[_0x4b37('0x16')](_0x2ab234+'は見つかりませんでした。');};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.