diff --git a/ahk_language/command first param to func outputVar/ArgIsVar in typeOfValidVarName obj.js b/ahk_language/command first param to func outputVar/ArgIsVar in typeOfValidVarName obj.js new file mode 100644 index 0000000..e6b1f6e --- /dev/null +++ b/ahk_language/command first param to func outputVar/ArgIsVar in typeOfValidVarName obj.js @@ -0,0 +1,15 @@ +// https://github.com/Lexikos/AutoHotkey_L/blob/2a30cfa9f8e59c8d9ebb8a6073c87ba210de952b/source/script.h#L1056 +const typeOfValidVarName = {'class':5,'autotrim':4,'blockinput':4,'break':4,'catch':4,'click':4,'clipwait':4,'continue':4,'control':4,'controlclick':4,'controlfocus':4,'controlget':4,'controlgetfocus':4,'controlgetpos':4,'controlgettext':4,'controlmove':4,'controlsend':4,'controlsendraw':4,'controlsettext':4,'coordmode':4,'critical':4,'detecthiddentext':4,'detecthiddenwindows':4,'drive':4,'driveget':4,'drivespacefree':4,'edit':4,'else':4,'envadd':4,'envdiv':4,'envget':4,'envmult':4,'envset':4,'envsub':4,'envupdate':4,'exit':4,'exitapp':4,'fileappend':4,'filecopy':4,'filecopydir':4,'filecreatedir':4,'filecreateshortcut':4,'filedelete':4,'fileencoding':4,'fileinstall':4,'filegetattrib':4,'filegetshortcut':4,'filegetsize':4,'filegettime':4,'filegetversion':4,'filemove':4,'filemovedir':4,'fileread':4,'filereadline':4,'filerecycle':4,'filerecycleempty':4,'fileremovedir':4,'fileselectfile':4,'fileselectfolder':4,'filesetattrib':4,'filesettime':4,'finally':4,'for':4,'formattime':4,'getkeystate':4,'gosub':4,'goto':4,'groupactivate':4,'groupadd':4,'groupclose':4,'groupdeactivate':4,'gui':4,'guicontrol':4,'guicontrolget':4,'hotkey':4,'ifequal':4,'ifnotequal':4,'ifexist':4,'ifnotexist':4,'ifgreater':4,'ifgreaterorequal':4,'ifinstring':4,'ifnotinstring':4,'ifless':4,'iflessorequal':4,'ifmsgbox':4,'ifwinactive':4,'ifwinnotactive':4,'ifwinexist':4,'ifwinnotexist':4,'imagesearch':4,'inidelete':4,'iniread':4,'iniwrite':4,'input':4,'inputbox':4,'keyhistory':4,'keywait':4,'listhotkeys':4,'listlines':4,'listvars':4,'loop':4,'menu':4,'mouseclick':4,'mouseclickdrag':4,'mousegetpos':4,'mousemove':4,'msgbox':4,'onexit':4,'outputdebug':4,'pause':4,'pixelgetcolor':4,'pixelsearch':4,'postmessage':4,'process':4,'progress':4,'random':4,'regdelete':4,'regread':4,'regwrite':4,'reload':4,'return':4,'run':4,'runas':4,'runwait':4,'send':4,'sendraw':4,'sendinput':4,'sendplay':4,'sendevent':4,'sendlevel':4,'sendmessage':4,'sendmode':4,'setbatchlines':4,'setcapslockstate':4,'setcontroldelay':4,'setdefaultmousespeed':4,'setenv':4,'setformat':4,'setkeydelay':4,'setmousedelay':4,'setnumlockstate':4,'setscrolllockstate':4,'setregview':4,'setstorecapslockmode':4,'settimer':4,'settitlematchmode':4,'setwindelay':4,'setworkingdir':4,'shutdown':4,'sleep':4,'sort':4,'soundbeep':4,'soundget':4,'soundgetwavevolume':4,'soundplay':4,'soundset':4,'soundsetwavevolume':4,'splashimage':4,'splashtexton':4,'splashtextoff':4,'splitpath':4,'statusbargettext':4,'statusbarwait':4,'stringcasesense':4,'stringgetpos':4,'stringleft':4,'stringlen':4,'stringlower':4,'stringmid':4,'stringreplace':4,'stringright':4,'stringsplit':4,'stringtrimleft':4,'stringtrimright':4,'stringupper':4,'suspend':4,'switch':4,'sysget':4,'thread':4,'throw':4,'tooltip':4,'transform':4,'traytip':4,'try':4,'until':4,'urldownloadtofile':4,'while':4,'winactivate':4,'winactivatebottom':4,'winclose':4,'wingetactivestats':4,'wingetactivetitle':4,'wingetclass':4,'winget':4,'wingetpos':4,'wingettext':4,'wingettitle':4,'winhide':4,'winkill':4,'winmaximize':4,'winmenuselectitem':4,'winminimize':4,'winminimizeall':4,'winminimizeallundo':4,'winmove':4,'winrestore':4,'winset':4,'winsettitle':4,'winshow':4,'winwait':4,'winwaitactive':4,'winwaitnotactive':4,'winwaitclose':4,'global':3,'local':3,'static':3,'if':2,'#clipboardtimeout':1,'#commentflag':1,'#errorstdout':1,'#escapechar':1,'#hotkeyinterval':1,'#hotkeymodifiertimeout':1,'#hotstring':1,'#if':1,'#ifwinactive':1,'#ifwinexist':1,'#ifwinnotactive':1,'#ifwinnotexist':1,'#iftimeout':1,'#include':1,'#includeagain':1,'#inputlevel':1,'#installkeybdhook':1,'#installmousehook':1,'#keyhistory':1,'#maxhotkeysperinterval':1,'#maxmem':1,'#maxthreads':1,'#maxthreadsbuffer':1,'#maxthreadsperhotkey':1,'#menumaskkey':1,'#noenv':1,'#notrayicon':1,'#persistent':1,'#requires':1,'#singleinstance':1,'#usehook':1,'#warn':1,'#winactivateforce':1,'#ltrim':1} + +const arr = ['ASSIGN','ASSIGNEXPR','ADD','SUB','MULT','DIV','CATCH','TRANSFORM','STRINGLEFT','GETKEYSTATE','CONTROLGETFOCUS','CONTROLGETTEXT','CONTROLGET','GUICONTROLGET','STATUSBARGETTEXT','INPUTBOX','RANDOM','INIREAD','REGREAD','DRIVESPACEFREE','DRIVEGET','SOUNDGET','SOUNDGETWAVEVOLUME','FILEREAD','FILEREADLINE','FILEGETATTRIB','FILEGETTIME','FILEGETSIZE','FILEGETVERSION','FILESELECTFILE','FILESELECTFOLDER','WINGETTITLE','WINGETCLASS','WINGET','WINGETTEXT','SYSGET','ENVGET','PIXELGETCOLOR','INPUT','FORMATTIME','SORT','IFINSTRING','IFNOTINSTRING','IFEQUAL','IFNOTEQUAL','IFGREATER','IFGREATEROREQUAL','IFLESS','IFLESSOREQUAL','IFBETWEEN','IFNOTBETWEEN','IFIN','IFNOTIN','IFCONTAINS','IFNOTCONTAINS','IFIS','IFISNOT'] +const arrIn = ['CATCH','TRANSFORM','STRINGLEFT','GETKEYSTATE','CONTROLGETFOCUS','CONTROLGETTEXT','CONTROLGET','GUICONTROLGET','STATUSBARGETTEXT','INPUTBOX','RANDOM','INIREAD','REGREAD','DRIVESPACEFREE','DRIVEGET','SOUNDGET','SOUNDGETWAVEVOLUME','FILEREAD','FILEREADLINE','FILEGETATTRIB','FILEGETTIME','FILEGETSIZE','FILEGETVERSION','FILESELECTFILE','FILESELECTFOLDER','WINGETTITLE','WINGETCLASS','WINGET','WINGETTEXT','SYSGET','ENVGET','PIXELGETCOLOR','INPUT','FORMATTIME','SORT','IFINSTRING','IFNOTINSTRING','IFEQUAL','IFNOTEQUAL','IFGREATER','IFGREATEROREQUAL','IFLESS','IFLESSOREQUAL'] +const arrNot = ['ASSIGN','ASSIGNEXPR','ADD','SUB','MULT','DIV','IFBETWEEN','IFNOTBETWEEN','IFIN','IFNOTIN','IFCONTAINS','IFNOTCONTAINS','IFIS','IFISNOT'] + +// for (let i = 0,len = arr.length; i < len; i++) { +// if (!typeOfValidVarName[arr[i].toLowerCase()]) { +// console.log(arr[i]) +// } +// } +for (let i = 0,len = arrIn.length; i < len; i++) { + console.log(arrIn[i]) +} \ No newline at end of file diff --git a/ahk_language/command first param to func outputVar/arrIn b/ahk_language/command first param to func outputVar/arrIn new file mode 100644 index 0000000..c1c0aee --- /dev/null +++ b/ahk_language/command first param to func outputVar/arrIn @@ -0,0 +1,43 @@ +CATCH +TRANSFORM +STRINGLEFT +GETKEYSTATE +CONTROLGETFOCUS +CONTROLGETTEXT +CONTROLGET +GUICONTROLGET +STATUSBARGETTEXT +INPUTBOX +RANDOM +INIREAD +REGREAD +DRIVESPACEFREE +DRIVEGET +SOUNDGET +SOUNDGETWAVEVOLUME +FILEREAD +FILEREADLINE +FILEGETATTRIB +FILEGETTIME +FILEGETSIZE +FILEGETVERSION +FILESELECTFILE +FILESELECTFOLDER +WINGETTITLE +WINGETCLASS +WINGET +WINGETTEXT +SYSGET +ENVGET +PIXELGETCOLOR +INPUT +FORMATTIME +SORT +IFINSTRING +IFNOTINSTRING +IFEQUAL +IFNOTEQUAL +IFGREATER +IFGREATEROREQUAL +IFLESS +IFLESSOREQUAL \ No newline at end of file diff --git a/ahk_language/command first param to func outputVar/in v2 commands b/ahk_language/command first param to func outputVar/in v2 commands new file mode 100644 index 0000000..b971feb --- /dev/null +++ b/ahk_language/command first param to func outputVar/in v2 commands @@ -0,0 +1,18 @@ +statusbargettext +random +iniread +regread +fileread +filegetattrib +filegettime +filegetsize +filegetversion +wingettitle +wingetclass +wingettext +sysget +envget +formattime +sort + +pixelgetcolor \ No newline at end of file diff --git a/ahk_language/command first param to func outputVar/manually filtered b/ahk_language/command first param to func outputVar/manually filtered new file mode 100644 index 0000000..22f015b --- /dev/null +++ b/ahk_language/command first param to func outputVar/manually filtered @@ -0,0 +1,36 @@ +TRANSFORM +STRINGLEFT +GETKEYSTATE +CONTROLGETFOCUS +CONTROLGETTEXT +CONTROLGET +GUICONTROLGET +STATUSBARGETTEXT +INPUTBOX +RANDOM +INIREAD +REGREAD +DRIVESPACEFREE +DRIVEGET +SOUNDGET +SOUNDGETWAVEVOLUME +FILEREAD +FILEREADLINE +FILEGETATTRIB +FILEGETTIME +FILEGETSIZE +FILEGETVERSION +FILESELECTFILE +FILESELECTFOLDER +WINGETTITLE +WINGETCLASS +WINGET +WINGETTEXT +SYSGET +ENVGET +PIXELGETCOLOR +INPUT +FORMATTIME +SORT +IFINSTRING +IFNOTINSTRING \ No newline at end of file diff --git a/ahk_language/command first param to func outputVar/notes b/ahk_language/command first param to func outputVar/notes new file mode 100644 index 0000000..20fe8e7 --- /dev/null +++ b/ahk_language/command first param to func outputVar/notes @@ -0,0 +1,28 @@ +v2 commands: https://github.com/Lexikos/AutoHotkey_L-Docs/tree/v2/docs/commands + +remove these: + +IFEQUAL +IFNOTEQUAL +IFLESS +IFLESSOREQUAL +IFGREATER +IFGREATEROREQUAL + +CATCH + +STRINGLEFT doesn't have v2 func: + +ok, so if in v2 commands + +PIXELGETCOLOR is special +sysget, I don't understand +Sort has custom function +v1: + Sort, MyVar, F IntegerSort D, + IntegerSort(a1, a2) + { + return a1 - a2 + } +v2: +SortedString := Sort(String [, Options, Callback]) diff --git a/ahk_language/command first param to func outputVar/v2 commands b/ahk_language/command first param to func outputVar/v2 commands new file mode 100644 index 0000000..716d43c --- /dev/null +++ b/ahk_language/command first param to func outputVar/v2 commands @@ -0,0 +1,333 @@ +ControlGetClassNN +ControlGetEnabled +ControlGetFocus +ControlGetHwnd +ControlGetIndex +ControlGetItems +ControlGetPos +ControlGetStyle +ControlGetText +ControlGetVisible +ControlHide +ControlHideDropDown +ControlMove +ControlSend +ControlSetChecked +ControlSetEnabled +ControlSetStyle +ControlSetText +ControlShow +ControlShowDropDown +CoordMode +Critical +DateAdd +DateDiff +DetectHiddenText +DetectHiddenWindows +DirCopy +DirCreate +DirDelete +DirExist +DirMove +DirSelect +DllCall +Download +Drive +DriveEject +DriveGetCapacity +DriveGetFileSystem +DriveGetLabel +DriveGetList +DriveGetSerial +DriveGetSpaceFree +DriveGetStatus +DriveGetStatusCD +DriveGetType +DriveLock +DriveSetLabel +DriveUnlock +Edit +EditGetCurrentCol +EditGetCurrentLine +EditGetLine +EditGetLineCount +EditGetSelectedText +EditPaste +Else +EnvGet +EnvSet +Exit +ExitApp +FileAppend +FileCopy +FileCreateShortcut +FileDelete +FileEncoding +FileExist +FileGetAttrib +FileGetShortcut +FileGetSize +FileGetTime +FileGetVersion +FileInstall +FileMove +FileOpen +FileRead +FileRecycle +FileRecycleEmpty +FileSelect +FileSetAttrib +FileSetTime +Finally +Float +For +Format +FormatTime +GetKeyName +GetKeySC +GetKeyState +GetKeyVK +GetMethod +Goto +GroupActivate +GroupAdd +GroupClose +GroupDeactivate +GuiControls +GuiCtrlFromHwnd +GuiFromHwnd +HasBase +HasMethod +HasProp +HotIf +Hotkey +Hotstring +If +ImageSearch +index +IniDelete +IniRead +IniWrite +InputBox +InputHook +InstallKeybdHook +InstallMouseHook +InStr +Integer +Is +IsLabel +IsObject +IsSet +KeyHistory +KeyWait +ListHotkeys +ListLines +ListVars +ListView +ListViewGetContent +LoadPicture +Loop +LoopFiles +LoopParse +LoopRead +LoopReg +Math +MenuFromHandle +MenuSelect +Monitor +MonitorGet +MonitorGetCount +MonitorGetName +MonitorGetPrimary +MonitorGetWorkArea +MouseClick +MouseClickDrag +MouseGetPos +MouseMove +MsgBox +Number +NumGet +NumPut +ObjAddRef +ObjBindMethod +OnClipboardChange +OnError +OnExit +OnMessage +Ord +OutputDebug +Pause +Persistent +PixelGetColor +PixelSearch +PostMessage +Process +ProcessClose +ProcessExist +ProcessSetPriority +ProcessWait +ProcessWaitClose +Random +RegDelete +RegDeleteKey +RegExMatch +RegExReplace +RegRead +RegWrite +Reload +Return +Run +RunAs +Send +SendLevel +SendMessage +SendMode +SetControlDelay +SetDefaultMouseSpeed +SetKeyDelay +SetMouseDelay +SetNumScrollCapsLockState +SetRegView +SetStoreCapsLockMode +SetTimer +SetTitleMatchMode +SetWinDelay +SetWorkingDir +Shutdown +Sleep +Sort +Sound +SoundBeep +SoundGetInterface +SoundGetMute +SoundGetName +SoundGetVolume +SoundPlay +SoundSetMute +SoundSetVolume +SplitPath +StatusBarGetText +StatusBarWait +StrCompare +StrGet +String +StrLen +StrLower +StrPtr +StrPut +StrReplace +StrSplit +SubStr +Suspend +Switch +SysGet +SysGetIPAddresses +Thread +Throw +ToolTip +TraySetIcon +TrayTip +TreeView +Trim +Try +Type +Until +VarSetStrCapacity +While +Win +WinActivate +WinActivateBottom +WinActive +WinClose +WinExist +WinGetClass +WinGetClientPos +WinGetControls +WinGetControlsHwnd +WinGetCount +WinGetID +WinGetIDLast +WinGetList +WinGetMinMax +WinGetPID +WinGetPos +WinGetProcessName +WinGetProcessPath +WinGetStyle +WinGetText +WinGetTitle +WinGetTransColor +WinGetTransparent +WinHide +WinKill +WinMaximize +WinMinimize +WinMinimizeAll +WinMove +WinMoveBottom +WinMoveTop +WinRedraw +WinRestore +WinSetAlwaysOnTop +WinSetEnabled +WinSetRegion +WinSetStyle +WinSetTitle +WinSetTransColor +WinSetTransparent +WinShow +WinWait +WinWaitActive +WinWaitClose +_ClipboardTimeout +_DllLoad +_ErrorStdOut +_HotIf +_HotIfTimeout +_Hotstring +_Include +_InputLevel +_MaxThreads +_MaxThreadsBuffer +_MaxThreadsPerHotkey +_NoTrayIcon +_Requires +_SingleInstance +_SuspendExempt +_UseHook +_Warn +_WinActivateForce +Block +BlockInput +Break +BufferAlloc +CallbackCreate +CaretGetPos +Catch +Chr +Click +ClipboardAll +ClipWait +ComCall +ComObjActive +ComObjArray +ComObjConnect +ComObject +ComObjFlags +ComObjFromPtr +ComObjGet +ComObjQuery +ComObjType +ComObjValue +ComValue +Continue +Control +ControlAddItem +ControlChooseIndex +ControlChooseString +ControlClick +ControlDeleteItem +ControlFindItem +ControlFocus +ControlGetChecked +ControlGetChoice \ No newline at end of file diff --git a/docs/modifyEverythingToV2.js b/docs/modifyEverythingToV2.js index 1f2051c..a76b6c6 100644 --- a/docs/modifyEverythingToV2.js +++ b/docs/modifyEverythingToV2.js @@ -1 +1 @@ -(()=>{"use strict";var e={246:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.emptyLinesObj=t.thisCouldBeFuncName=t.elseTryFinally=t.elseLoopReturn=t.legacyIfOperators=t.v2Continuator=t.v1Continuator=t.assignmentOperators=t.operatorsObj=t.whiteSpaceOverrideAssign=t.typeOfValidVarName=t.namedIf=t.propCharsObj=t.variableCharsObj=t.whiteSpaceObj=t.whiteSpace=void 0,t.whiteSpace=/\u000B\u000C\u0020\u00A0/,t.whiteSpaceObj={" ":!0,"\t":!0},t.variableCharsObj={a:!0,b:!0,c:!0,d:!0,e:!0,f:!0,g:!0,h:!0,i:!0,j:!0,k:!0,l:!0,m:!0,n:!0,o:!0,p:!0,q:!0,r:!0,s:!0,t:!0,u:!0,v:!0,w:!0,x:!0,y:!0,z:!0,A:!0,B:!0,C:!0,D:!0,E:!0,F:!0,G:!0,H:!0,I:!0,J:!0,K:!0,L:!0,M:!0,N:!0,O:!0,P:!0,Q:!0,R:!0,S:!0,T:!0,U:!0,V:!0,W:!0,X:!0,Y:!0,Z:!0,0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,_:!0,"#":!0,"@":!0,$:!0},t.propCharsObj={a:!0,b:!0,c:!0,d:!0,e:!0,f:!0,g:!0,h:!0,i:!0,j:!0,k:!0,l:!0,m:!0,n:!0,o:!0,p:!0,q:!0,r:!0,s:!0,t:!0,u:!0,v:!0,w:!0,x:!0,y:!0,z:!0,A:!0,B:!0,C:!0,D:!0,E:!0,F:!0,G:!0,H:!0,I:!0,J:!0,K:!0,L:!0,M:!0,N:!0,O:!0,P:!0,Q:!0,R:!0,S:!0,T:!0,U:!0,V:!0,W:!0,X:!0,Y:!0,Z:!0,0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,_:!0},t.namedIf={ifequal:!0,ifnotequal:!0,ifless:!0,iflessorequal:!0,ifgreater:!0,ifgreaterorequal:!0},t.typeOfValidVarName={class:5,autotrim:4,blockinput:4,break:4,catch:4,click:4,clipwait:4,continue:4,control:4,controlclick:4,controlfocus:4,controlget:4,controlgetfocus:4,controlgetpos:4,controlgettext:4,controlmove:4,controlsend:4,controlsendraw:4,controlsettext:4,coordmode:4,critical:4,detecthiddentext:4,detecthiddenwindows:4,drive:4,driveget:4,drivespacefree:4,edit:4,else:4,envadd:4,envdiv:4,envget:4,envmult:4,envset:4,envsub:4,envupdate:4,exit:4,exitapp:4,fileappend:4,filecopy:4,filecopydir:4,filecreatedir:4,filecreateshortcut:4,filedelete:4,fileencoding:4,fileinstall:4,filegetattrib:4,filegetshortcut:4,filegetsize:4,filegettime:4,filegetversion:4,filemove:4,filemovedir:4,fileread:4,filereadline:4,filerecycle:4,filerecycleempty:4,fileremovedir:4,fileselectfile:4,fileselectfolder:4,filesetattrib:4,filesettime:4,finally:4,for:4,formattime:4,getkeystate:4,gosub:4,goto:4,groupactivate:4,groupadd:4,groupclose:4,groupdeactivate:4,gui:4,guicontrol:4,guicontrolget:4,hotkey:4,ifequal:4,ifnotequal:4,ifexist:4,ifnotexist:4,ifgreater:4,ifgreaterorequal:4,ifinstring:4,ifnotinstring:4,ifless:4,iflessorequal:4,ifmsgbox:4,ifwinactive:4,ifwinnotactive:4,ifwinexist:4,ifwinnotexist:4,imagesearch:4,inidelete:4,iniread:4,iniwrite:4,input:4,inputbox:4,keyhistory:4,keywait:4,listhotkeys:4,listlines:4,listvars:4,loop:4,menu:4,mouseclick:4,mouseclickdrag:4,mousegetpos:4,mousemove:4,msgbox:4,onexit:4,outputdebug:4,pause:4,pixelgetcolor:4,pixelsearch:4,postmessage:4,process:4,progress:4,random:4,regdelete:4,regread:4,regwrite:4,reload:4,return:4,run:4,runas:4,runwait:4,send:4,sendraw:4,sendinput:4,sendplay:4,sendevent:4,sendlevel:4,sendmessage:4,sendmode:4,setbatchlines:4,setcapslockstate:4,setcontroldelay:4,setdefaultmousespeed:4,setenv:4,setformat:4,setkeydelay:4,setmousedelay:4,setnumlockstate:4,setscrolllockstate:4,setregview:4,setstorecapslockmode:4,settimer:4,settitlematchmode:4,setwindelay:4,setworkingdir:4,shutdown:4,sleep:4,sort:4,soundbeep:4,soundget:4,soundgetwavevolume:4,soundplay:4,soundset:4,soundsetwavevolume:4,splashimage:4,splashtexton:4,splashtextoff:4,splitpath:4,statusbargettext:4,statusbarwait:4,stringcasesense:4,stringgetpos:4,stringleft:4,stringlen:4,stringlower:4,stringmid:4,stringreplace:4,stringright:4,stringsplit:4,stringtrimleft:4,stringtrimright:4,stringupper:4,suspend:4,switch:4,sysget:4,thread:4,throw:4,tooltip:4,transform:4,traytip:4,try:4,until:4,urldownloadtofile:4,while:4,winactivate:4,winactivatebottom:4,winclose:4,wingetactivestats:4,wingetactivetitle:4,wingetclass:4,winget:4,wingetpos:4,wingettext:4,wingettitle:4,winhide:4,winkill:4,winmaximize:4,winmenuselectitem:4,winminimize:4,winminimizeall:4,winminimizeallundo:4,winmove:4,winrestore:4,winset:4,winsettitle:4,winshow:4,winwait:4,winwaitactive:4,winwaitnotactive:4,winwaitclose:4,global:3,local:3,static:3,if:2,"#clipboardtimeout":1,"#commentflag":1,"#errorstdout":1,"#escapechar":1,"#hotkeyinterval":1,"#hotkeymodifiertimeout":1,"#hotstring":1,"#if":1,"#ifwinactive":1,"#ifwinexist":1,"#ifwinnotactive":1,"#ifwinnotexist":1,"#iftimeout":1,"#include":1,"#includeagain":1,"#inputlevel":1,"#installkeybdhook":1,"#installmousehook":1,"#keyhistory":1,"#maxhotkeysperinterval":1,"#maxmem":1,"#maxthreads":1,"#maxthreadsbuffer":1,"#maxthreadsperhotkey":1,"#menumaskkey":1,"#noenv":1,"#notrayicon":1,"#persistent":1,"#requires":1,"#singleinstance":1,"#usehook":1,"#warn":1,"#winactivateforce":1,"#ltrim":1},t.whiteSpaceOverrideAssign={1:!0,2:!0,3:!0},t.operatorsObj={new:!0,"++":!0,"--":!0,"**":!0,"!":!0,"~":!0,"&":!0,"*":!0,"/":!0,"//":!0,"-":!0,"+":!0,"<<":!0,">>":!0,"^":!0,"|":!0,".":!0,"~=":!0,">":!0,"<":!0,">=":!0,"<=":!0,"=":!0,"==":!0,"<>":!0,"!=":!0,not:!0,and:!0,"&&":!0,or:!0,"||":!0,"?":!0,":":!0,":=":!0,"+=":!0,"-=":!0,"*=":!0,"/=":!0,"//=":!0,".=":!0,"|=":!0,"&=":!0,"^=":!0,">>=":!0,"<<=":!0},t.assignmentOperators={"++":!0,"--":!0,":=":!0,"+=":!0,"-=":!0,"*=":!0,"/=":!0,"//=":!0,".=":!0,"|=":!0,"&=":!0,"^=":!0,">>=":!0,"<<=":!0},t.v1Continuator={",":!0,"**":!0,"!":!0,"~":!0,"&":!0,"*":!0,"/":!0,"//":!0,"-":!0,"+":!0,"<<":!0,">>":!0,"^":!0,"|":!0,".":!0,"~=":!0,">":!0,"<":!0,">=":!0,"<=":!0,"=":!0,"==":!0,"<>":!0,"!=":!0,"&&":!0,"||":!0,"?":!0,":=":!0,"+=":!0,"-=":!0,"*=":!0,"/=":!0,"//=":!0,".=":!0,"|=":!0,"&=":!0,"^=":!0,">>=":!0,"<<=":!0},t.v2Continuator={"**":!0,"!":!0,"~":!0,"&":!0,"*":!0,"/":!0,"//":!0,"-":!0,"+":!0,"<<":!0,">>":!0,"^":!0,"|":!0,".":!0,"~=":!0,">":!0,"<":!0,">=":!0,"<=":!0,"=":!0,"==":!0,"<>":!0,"!=":!0,and:!0,"&&":!0,or:!0,"||":!0,"?":!0,":":!0,":=":!0,"+=":!0,"-=":!0,"*=":!0,"/=":!0,"//=":!0,".=":!0,"|=":!0,"&=":!0,"^=":!0,">>=":!0,"<<=":!0},t.legacyIfOperators={"=":!0,"<>":!0,"!=":!0,">":!0,">=":!0,"<":!0,"<=":!0},t.elseLoopReturn={else:!0,loop:!0,return:!0,try:!0,finally:!0},t.elseTryFinally={else:"else",try:"try",finally:"finally"},t.thisCouldBeFuncName={idkVariable:!0,"(.) property findTrailingExpr":!0},t.emptyLinesObj={emptyLines:!0,"emptyLines EOF":!0}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}var n={};(()=>{var e=n;const t=i(246),r=console.debug.bind(console),s={biga:!0,WinClip:!0,WinClipAPI:!0},o={settitlematchmode:!0},f={goto:!0,"#singleinstance":!0,break:!0,continue:!0},l={stringupper:"StrUpper",stringlower:"StrLower"},a={"DIRECTIVE OR COMMAND comma":!0,command:!0},c={idkVariable:!0,assignment:!0},u={"{ legacyIf":!0,"{ if":!0,"{ for":!0,"{ else":!0,"{ loop":!0,"{ namedIf":!0},p={"{ class":!0,"{ function DEFINITION":!0,"{ legacyIf":!0,"{ if":!0,"{ for":!0,"{ else":!0,"{ loop":!0,"{ namedIf":!0},d={"v1String findV1Expression":!0,"v1String findPercentVarV1Expression":!0,"v1String findV1Expression beforeSingleComma":!0},m={"%START %Var%":!0,"END% %Var%":!0},y={whiteSpaces:!0,emptyLines:!0},g={"( group":") group","start unit":"end unit"},x={on:"1",off:"0"},h={"end assignment":!0,", function CALL":!0,") function CALL":!0,", assignment":!0,"end comma assignment":!0},w={" ":!0,"\t":!0,"\n":!0,",":!0,"<":!0,">":!0,"=":!0,"!":!0},v={", command whiteSpace":!0,", command comma":!0},b={"v1String findV1Expression":!0,"%START %Var%":!0,"v1String findPercentVarV1Expression":!0},k={Param:!0,idkVariable:!0,assignment:!0,"v1String findIdkVar":!0,"var at v1Assignment":!0};e.default=(e,i=!0)=>{const n=i?"BufferAlloc":"Buffer",L={},C={};for(let t=0,i=e.length;tv2 expr"===L)k.text="";else if("functionName"===L){const t=e[T].text,i=e[T-1],r=t.toLowerCase();if(i&&". property"===e[T-1].type){if("length"===r){k.type="v2: prop";const t=N=T+1;if(ne(") function CALL","( function CALL"))return 2;e.splice(t,N-t+1)}else if("haskey"===r)k.text="Has";else if("count"===r){if(N=T,!re("start unit","end unit"))return 3;const t=N;if(N=T+1,ne(") function CALL","( function CALL"))return 2;$=[],V=[e.slice(t+1,T-1)],U("(Type("),W(1),U(')=="Array"?'),W(1),U(".Length:"),W(1),U(".Count)"),e.splice(t,N-t+1,...$)}return 3}if("varsetcapacity"===r){if(X())return 2;1===V.length?(W(1),U(".Size"),J()):(W(1),U(`:=${n}(`),W(2),H(",",3),W(3),U(")"),J())}else if("strreplace"===r){if(X())return 2;U("StrReplace("),W(1),U(","),W(2),H(",",3),W(3),H(",0,",4),W(4),H(",",5),W(5),U(")"),J()}else if("object"===r)k.text="Map";else if("numput"===r){if(X())return 2;const e=V.length;U("NumPut("),4===e?W(4):U('"UPtr"'),U(","),W(1),U(","),W(2),e>2&&(U(","),W(3)),U(")"),J()}else if("numget"===r){if(X())return 2;const e=V.length;U("NumGet("),W(1),U(","),W(2),U(","),3===e?W(3):U('"UPtr"'),U(")"),J()}else if("objgetaddress"===r){if(X())return 2;W(1),U("["),W(2),U("].Ptr"),J()}else if("objsetcapacity"===r){if(X())return 2;3===V.length?(W(1),U("["),W(2),U(`]:=${n}(`),W(3),U(")"),J()):(U("ObjSetCapacity("),W(1),U(","),W(2),U(")"),J())}else if("objgetcapacity"===r){if(X())return 2;if(2===V.length){const e=K(V[0]);if(e.length&&"[ Array"===e[0].type&&"] Array"===e[e.length-1].type){const t=V[1]=K(V[1]);if(3===t.length&&"Integer"===t[1].type&&"1"===t[1].text)return V[0]=e.slice(1,-1),U("VarSetStrCapacity("),W(1),U(")"),J(),3}W(1),U("["),W(2),U("].Size"),J()}else U("ObjGetCapacity("),W(1),U(")"),J()}else if("objhaskey"===r){if(X())return 2;W(1),U(".Has("),W(2),U(")"),J()}else if("objrawset"===r){if(X())return 2;W(1),U("["),W(2),U("]:="),W(3),J()}else if("objrawget"===r){if(X())return 2;W(1),U("["),W(2),U("]"),J()}else for(;;){if(I=e[++T],!I)return 2;const t=I.type,i=P();if(3!==i){if(i)return i;if(") function CALL"===t)return 3}}}else if("(.) property findTrailingExpr"===L)"Integer"!==e[T-2].type&&(e[T-1].text="",k.text=`["${e[T].text}"]`,k.type="v2: arrAccess");else if("if"===L){N=T+2;let t=e[N];if(t){let i=!1;if("( if"===t.type){if(N++,t=e[N],!t)return 3;i=!0}if("start unit"===t.type&&ne("end unit","start unit"))return 2;if(t=e[N+(i?2:1)],t&&"end if"===t.type){if(N--,t=e[N],"] ArrAccess"===t.type){if(t.type="edit",t.text=")",!re("[ ArrAccess","] ArrAccess"))return 2;const i=e[N];i.type="edit",i.text=".Has("}return 3}}}else if(c[L]){const t=e[T].text;if(-1===t.indexOf("%")&&"a_isunicode"===t.toLowerCase()){for(;N=T,ie();){let t=T-1;if("? ternary"===e[N].type){I=e[N+1],I&&("emptyLines"!==I.type||I.text.includes("\n")||N++);const i=N+1;let n,r=!1;for(;N=T,te();){"( group"===e[N].type&&(r=!0,t=N);break}if(N=i,!Z(": ternary"))break;const s=N,o=e[N-1];o&&("emptyLines"!==o.type||o.text.includes("\n")||N--);const f=N;if(N=s,r){if(ne(") group","( group"))break;n=N+1}else{if(!Y(h))break;n=N}let l=n-t;return N=n,ee(),e[N].text.includes("\n")&&l--,e.splice(t,l,...e.slice(i,f)),3}break}k.text="true"}}else if("(statement) ,"===L){k.text=" ";const t=e[T+1];y[t.type]&&(k.text="")}else if(m[L])k.text="";else if(d[L]){const t=k.text;if(""!==t||"v1String findV1Expression"===L){let i,n="";N=T+1,i=e[N];e:for(;;){for(;i;){if(i.text){const e=i.text[0];w[e]||(n=" ");break e}i=e[++N]}break e}k.text=`${w[e[T-1].text.slice(-1)]?"":" "}"${t.replace(/"/g,'`"')}"${n}`}}else if("<>"===k.text&&"2operator"===L)k.text="!=";else{if("= v1Assignment"===L){k.text=":=";let t=e[++T];return t&&"whiteSpaces"===t.type&&(t=e[++T]),t&&b[t.type]||e.splice(T,0,{type:"v1String findV1Expression",text:""}),1}if("String"===L)k.text=`"${k.text.slice(1,-1).replace(/""/g,'`"')}"`;else if(a[L]){let t;const i=k.text.toLowerCase();if(o[i]){if(function(t){if(M())return!0;{let t=0;e:for(;;){if(I=e[T],!I)return!0;const i=I.type;if(d[i]&&!isNaN(Number(I.text))){I.type="edit",T++;continue e}const n=P();if(1!==n){if(2===n)return!0;if(3!==n){if("end command"===i)return!1;if(v[i]&&(t++,1===t))return!1;T++}else T++}}}}())return 3}else if("mousegetpos"===i){if(function(t){if(M())return!0;{let t=0;e:for(;;){if(I=e[T],!I)return!0;const i=I.type;if(d[i]){I.type="edit",T++;continue e}const n=P();if(1!==n){if(2===n)return!0;if(3!==n){if("end command"===i)return!1;if(v[i]&&(t++,4===t))break e;T++}else T++}}}e:for(;;){if(I=e[T],!I)return!0;const t=I.type;if(d[t]&&!isNaN(Number(I.text))){I.type="edit",T++;continue e}const i=P();if(1!==i){if(2===i)return!0;if(3!==i){if("end command"===t)return!1;T++}else T++}}}())return 3}else if("mousemove"===i){if(R(3))return 3}else if("pixelsearch"===i){if(function(t,i){if(M())return!0;{let t=0;e:for(;;){if(I=e[T],!I)return!0;const i=I.type;if(d[i]){I.type="edit",T++;continue e}const n=P();if(1!==n){if(2===n)return!0;if(3!==n){if("end command"===i)return!1;if(v[i]&&(t++,2===t))break e;T++}else T++}}}let n=-1;e:for(;;){if(I=e[T],!I)return!0;const t=I.type;if(d[t]&&!isNaN(Number(I.text))){I.type="edit",T++;continue e}const i=P();if(1!==i){if(2===i)return!0;if(3!==i){if("end command"===t)return!1;if(v[t]&&(n++,6===n))return q("end command"),!1;T++}else T++}}}())return 3}else{if("setbatchlines"===i)return z(),1;if(f[i]){if(R(1))return 3}else if("listlines"===i){if(M())return 3;if("v1String findV1Expression"!==I.type)return 1;{const e=I.text;x[e.toLowerCase()]?(I.type="edit",I.text=x[e.toLowerCase()]):isNaN(Number(e))?(I.type="edit",I.text="0"):I.type="edit"}}else if("splitpath"===i){if(R(5))return 3}else if("stringtrimright"===i){if(M())return 3;if(D(),Q())return 2;W(1),U(":=SubStr("),W(2),U(",1,-"),W(3),U(")"),B(),J()}else if(t=l[i]){if(M())return 3;if(function(t){let i=1;for(;;){if(I=e[++N],!I)return!0;const n=I.type;if(m[n]||d[n])t[i]&&(I.type="edit");else if(v[n])i++;else if("end command"===n)return!0}}({1:!0,2:!0}),Q())return 2;W(1),U(`:=${t}(`),W(2),H(",",3),W(3),U(")"),B(),J()}else{if("iniread"===i)return F("IniRead");if("wingettitle"===i)return F("WinGetTitle");if("random"===i){if(D(),Q())return 2;W(1),U(":=Random("),W(2),H(",",3),W(3),U(")"),B(),J()}else if("pixelgetcolor"===i){const e=T;if(R(3))return 3;if(T=e,Q())return 2;W(1),U(":=PixelGetColor("),W(2),H(",",3),W(3),H(",",4);const t=V[3];let i;if(t&&(i=t.length))for(let e=0;e1&&W(2);for(let e=3,t=V.length+1;ei&&y[e[t].type];t--);return e.slice(i,t+1)}function Q(){const t=T;T+=2;let i,n=T;const r=[];for(;;)for(;;){if(i=e[T],!i)return!0;const s=i.type,o=P();if(1!==o){if(2===o)return!0;if(3!==o){if("end command"===s){const i=T+1-t;return r.push(e.slice(n,T)),e.splice(t,i),T-=i,V=r,E=t,$=[],!1}v[s]&&(r.push(e.slice(n,T)),n=T+1),T++}else T++}}}function X(){const t=T;T+=2;let i,n=T;const r=[];for(;;)for(;;){if(i=e[T],!i)return!0;const s=i.type,o=P();if(1!==o){if(2===o)return!0;if(3!==o){if(") function CALL"===s){const i=T+1-t;return r.push(e.slice(n,T)),e.splice(t,i),T-=i,V=r,E=t,$=[],!1}", function CALL"===s&&(r.push(e.slice(n,T)),n=T+1),T++}else T++}}}function Y(t){let i;for(i=e[++N];i;){const n=i.type;if(t[n])return n;i=e[++N]}return!1}function Z(t){let i;for(i=e[++N];i;){if(i.type===t)return!0;i=e[++N]}return!1}function ee(){let t;for(t=e[--N];t;){if(void 0!==t.text)return!0;t=e[--N]}return!1}function te(){let t;for(t=e[--N];t;){if("emptyLines"!==t.type&&void 0!==t.text)return!0;t=e[--N]}return!1}function ie(){let t;for(t=e[++N];t;){if("emptyLines"!==t.type&&void 0!==t.text)return!0;t=e[++N]}return!1}function ne(t,i){let n,r=1;for(n=e[++N];n;){const s=n.type;if(r&&(s===t?r--:s===i&&r++,0===r))return!1;n=e[++N]}return!0}function re(t,i){let n,r=1;for(;N--;){n=e[N];const s=n.type;if(r&&(s===t?r--:s===i&&r++,0===r))return!0}return!1}}})(),window.modifyEverythingToV2=n.default})(); \ No newline at end of file +(()=>{"use strict";var e={246:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.emptyLinesObj=t.thisCouldBeFuncName=t.elseTryFinally=t.elseLoopReturn=t.legacyIfOperators=t.v2Continuator=t.v1Continuator=t.assignmentOperators=t.operatorsObj=t.whiteSpaceOverrideAssign=t.typeOfValidVarName=t.namedIf=t.propCharsObj=t.variableCharsObj=t.whiteSpaceObj=t.whiteSpace=void 0,t.whiteSpace=/\u000B\u000C\u0020\u00A0/,t.whiteSpaceObj={" ":!0,"\t":!0},t.variableCharsObj={a:!0,b:!0,c:!0,d:!0,e:!0,f:!0,g:!0,h:!0,i:!0,j:!0,k:!0,l:!0,m:!0,n:!0,o:!0,p:!0,q:!0,r:!0,s:!0,t:!0,u:!0,v:!0,w:!0,x:!0,y:!0,z:!0,A:!0,B:!0,C:!0,D:!0,E:!0,F:!0,G:!0,H:!0,I:!0,J:!0,K:!0,L:!0,M:!0,N:!0,O:!0,P:!0,Q:!0,R:!0,S:!0,T:!0,U:!0,V:!0,W:!0,X:!0,Y:!0,Z:!0,0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,_:!0,"#":!0,"@":!0,$:!0},t.propCharsObj={a:!0,b:!0,c:!0,d:!0,e:!0,f:!0,g:!0,h:!0,i:!0,j:!0,k:!0,l:!0,m:!0,n:!0,o:!0,p:!0,q:!0,r:!0,s:!0,t:!0,u:!0,v:!0,w:!0,x:!0,y:!0,z:!0,A:!0,B:!0,C:!0,D:!0,E:!0,F:!0,G:!0,H:!0,I:!0,J:!0,K:!0,L:!0,M:!0,N:!0,O:!0,P:!0,Q:!0,R:!0,S:!0,T:!0,U:!0,V:!0,W:!0,X:!0,Y:!0,Z:!0,0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,_:!0},t.namedIf={ifequal:!0,ifnotequal:!0,ifless:!0,iflessorequal:!0,ifgreater:!0,ifgreaterorequal:!0},t.typeOfValidVarName={class:5,autotrim:4,blockinput:4,break:4,catch:4,click:4,clipwait:4,continue:4,control:4,controlclick:4,controlfocus:4,controlget:4,controlgetfocus:4,controlgetpos:4,controlgettext:4,controlmove:4,controlsend:4,controlsendraw:4,controlsettext:4,coordmode:4,critical:4,detecthiddentext:4,detecthiddenwindows:4,drive:4,driveget:4,drivespacefree:4,edit:4,else:4,envadd:4,envdiv:4,envget:4,envmult:4,envset:4,envsub:4,envupdate:4,exit:4,exitapp:4,fileappend:4,filecopy:4,filecopydir:4,filecreatedir:4,filecreateshortcut:4,filedelete:4,fileencoding:4,fileinstall:4,filegetattrib:4,filegetshortcut:4,filegetsize:4,filegettime:4,filegetversion:4,filemove:4,filemovedir:4,fileread:4,filereadline:4,filerecycle:4,filerecycleempty:4,fileremovedir:4,fileselectfile:4,fileselectfolder:4,filesetattrib:4,filesettime:4,finally:4,for:4,formattime:4,getkeystate:4,gosub:4,goto:4,groupactivate:4,groupadd:4,groupclose:4,groupdeactivate:4,gui:4,guicontrol:4,guicontrolget:4,hotkey:4,ifequal:4,ifnotequal:4,ifexist:4,ifnotexist:4,ifgreater:4,ifgreaterorequal:4,ifinstring:4,ifnotinstring:4,ifless:4,iflessorequal:4,ifmsgbox:4,ifwinactive:4,ifwinnotactive:4,ifwinexist:4,ifwinnotexist:4,imagesearch:4,inidelete:4,iniread:4,iniwrite:4,input:4,inputbox:4,keyhistory:4,keywait:4,listhotkeys:4,listlines:4,listvars:4,loop:4,menu:4,mouseclick:4,mouseclickdrag:4,mousegetpos:4,mousemove:4,msgbox:4,onexit:4,outputdebug:4,pause:4,pixelgetcolor:4,pixelsearch:4,postmessage:4,process:4,progress:4,random:4,regdelete:4,regread:4,regwrite:4,reload:4,return:4,run:4,runas:4,runwait:4,send:4,sendraw:4,sendinput:4,sendplay:4,sendevent:4,sendlevel:4,sendmessage:4,sendmode:4,setbatchlines:4,setcapslockstate:4,setcontroldelay:4,setdefaultmousespeed:4,setenv:4,setformat:4,setkeydelay:4,setmousedelay:4,setnumlockstate:4,setscrolllockstate:4,setregview:4,setstorecapslockmode:4,settimer:4,settitlematchmode:4,setwindelay:4,setworkingdir:4,shutdown:4,sleep:4,sort:4,soundbeep:4,soundget:4,soundgetwavevolume:4,soundplay:4,soundset:4,soundsetwavevolume:4,splashimage:4,splashtexton:4,splashtextoff:4,splitpath:4,statusbargettext:4,statusbarwait:4,stringcasesense:4,stringgetpos:4,stringleft:4,stringlen:4,stringlower:4,stringmid:4,stringreplace:4,stringright:4,stringsplit:4,stringtrimleft:4,stringtrimright:4,stringupper:4,suspend:4,switch:4,sysget:4,thread:4,throw:4,tooltip:4,transform:4,traytip:4,try:4,until:4,urldownloadtofile:4,while:4,winactivate:4,winactivatebottom:4,winclose:4,wingetactivestats:4,wingetactivetitle:4,wingetclass:4,winget:4,wingetpos:4,wingettext:4,wingettitle:4,winhide:4,winkill:4,winmaximize:4,winmenuselectitem:4,winminimize:4,winminimizeall:4,winminimizeallundo:4,winmove:4,winrestore:4,winset:4,winsettitle:4,winshow:4,winwait:4,winwaitactive:4,winwaitnotactive:4,winwaitclose:4,global:3,local:3,static:3,if:2,"#clipboardtimeout":1,"#commentflag":1,"#errorstdout":1,"#escapechar":1,"#hotkeyinterval":1,"#hotkeymodifiertimeout":1,"#hotstring":1,"#if":1,"#ifwinactive":1,"#ifwinexist":1,"#ifwinnotactive":1,"#ifwinnotexist":1,"#iftimeout":1,"#include":1,"#includeagain":1,"#inputlevel":1,"#installkeybdhook":1,"#installmousehook":1,"#keyhistory":1,"#maxhotkeysperinterval":1,"#maxmem":1,"#maxthreads":1,"#maxthreadsbuffer":1,"#maxthreadsperhotkey":1,"#menumaskkey":1,"#noenv":1,"#notrayicon":1,"#persistent":1,"#requires":1,"#singleinstance":1,"#usehook":1,"#warn":1,"#winactivateforce":1,"#ltrim":1},t.whiteSpaceOverrideAssign={1:!0,2:!0,3:!0},t.operatorsObj={new:!0,"++":!0,"--":!0,"**":!0,"!":!0,"~":!0,"&":!0,"*":!0,"/":!0,"//":!0,"-":!0,"+":!0,"<<":!0,">>":!0,"^":!0,"|":!0,".":!0,"~=":!0,">":!0,"<":!0,">=":!0,"<=":!0,"=":!0,"==":!0,"<>":!0,"!=":!0,not:!0,and:!0,"&&":!0,or:!0,"||":!0,"?":!0,":":!0,":=":!0,"+=":!0,"-=":!0,"*=":!0,"/=":!0,"//=":!0,".=":!0,"|=":!0,"&=":!0,"^=":!0,">>=":!0,"<<=":!0},t.assignmentOperators={"++":!0,"--":!0,":=":!0,"+=":!0,"-=":!0,"*=":!0,"/=":!0,"//=":!0,".=":!0,"|=":!0,"&=":!0,"^=":!0,">>=":!0,"<<=":!0},t.v1Continuator={",":!0,"**":!0,"!":!0,"~":!0,"&":!0,"*":!0,"/":!0,"//":!0,"-":!0,"+":!0,"<<":!0,">>":!0,"^":!0,"|":!0,".":!0,"~=":!0,">":!0,"<":!0,">=":!0,"<=":!0,"=":!0,"==":!0,"<>":!0,"!=":!0,"&&":!0,"||":!0,"?":!0,":=":!0,"+=":!0,"-=":!0,"*=":!0,"/=":!0,"//=":!0,".=":!0,"|=":!0,"&=":!0,"^=":!0,">>=":!0,"<<=":!0},t.v2Continuator={"**":!0,"!":!0,"~":!0,"&":!0,"*":!0,"/":!0,"//":!0,"-":!0,"+":!0,"<<":!0,">>":!0,"^":!0,"|":!0,".":!0,"~=":!0,">":!0,"<":!0,">=":!0,"<=":!0,"=":!0,"==":!0,"<>":!0,"!=":!0,and:!0,"&&":!0,or:!0,"||":!0,"?":!0,":":!0,":=":!0,"+=":!0,"-=":!0,"*=":!0,"/=":!0,"//=":!0,".=":!0,"|=":!0,"&=":!0,"^=":!0,">>=":!0,"<<=":!0},t.legacyIfOperators={"=":!0,"<>":!0,"!=":!0,">":!0,">=":!0,"<":!0,"<=":!0},t.elseLoopReturn={else:!0,loop:!0,return:!0,try:!0,finally:!0},t.elseTryFinally={else:"else",try:"try",finally:"finally"},t.thisCouldBeFuncName={idkVariable:!0,"(.) property findTrailingExpr":!0},t.emptyLinesObj={emptyLines:!0,"emptyLines EOF":!0}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}var n={};(()=>{var e=n;const t=i(246),r=console.debug.bind(console),s={biga:!0,WinClip:!0,WinClipAPI:!0},o={settitlematchmode:!0},f={goto:!0,"#singleinstance":!0,break:!0,continue:!0},l={stringupper:"StrUpper",stringlower:"StrLower"},a={"DIRECTIVE OR COMMAND comma":!0,command:!0},c={idkVariable:!0,assignment:!0},u={"{ legacyIf":!0,"{ if":!0,"{ for":!0,"{ else":!0,"{ loop":!0,"{ namedIf":!0},p={"{ class":!0,"{ function DEFINITION":!0,"{ legacyIf":!0,"{ if":!0,"{ for":!0,"{ else":!0,"{ loop":!0,"{ namedIf":!0},d={"v1String findV1Expression":!0,"v1String findPercentVarV1Expression":!0,"v1String findV1Expression beforeSingleComma":!0},g={"%START %Var%":!0,"END% %Var%":!0},m={whiteSpaces:!0,emptyLines:!0},y={"( group":") group","start unit":"end unit"},x={on:"1",off:"0"},h={"end assignment":!0,", function CALL":!0,") function CALL":!0,", assignment":!0,"end comma assignment":!0},w={" ":!0,"\t":!0,"\n":!0,",":!0,"<":!0,">":!0,"=":!0,"!":!0},v={", command whiteSpace":!0,", command comma":!0},b={"v1String findV1Expression":!0,"%START %Var%":!0,"v1String findPercentVarV1Expression":!0},k={Param:!0,idkVariable:!0,assignment:!0,"v1String findIdkVar":!0,"var at v1Assignment":!0};e.default=(e,i=!0)=>{const n=i?"BufferAlloc":"Buffer",L={},C={};for(let t=0,i=e.length;tv2 expr"===L)k.text="";else if("functionName"===L){const t=e[T].text,i=e[T-1],r=t.toLowerCase();if(i&&". property"===e[T-1].type){if("length"===r){k.type="v2: prop";const t=N=T+1;if(ie(") function CALL","( function CALL"))return 2;e.splice(t,N-t+1)}else if("haskey"===r)k.text="Has";else if("count"===r){if(N=T,!ne("start unit","end unit"))return 3;const t=N;if(N=T+1,ie(") function CALL","( function CALL"))return 2;$=[],V=[e.slice(t+1,T-1)],D("(Type("),W(1),D(')=="Array"?'),W(1),D(".Length:"),W(1),D(".Count)"),e.splice(t,N-t+1,...$)}return 3}if("varsetcapacity"===r){if(Q())return 2;1===V.length?(W(1),D(".Size"),H()):(W(1),D(`:=${n}(`),W(2),U(",",3),W(3),D(")"),H())}else if("strreplace"===r){if(Q())return 2;D("StrReplace("),W(1),D(","),W(2),U(",",3),W(3),U(",0,",4),W(4),U(",",5),W(5),D(")"),H()}else if("object"===r)k.text="Map";else if("numput"===r){if(Q())return 2;const e=V.length;D("NumPut("),4===e?W(4):D('"UPtr"'),D(","),W(1),D(","),W(2),e>2&&(D(","),W(3)),D(")"),H()}else if("numget"===r){if(Q())return 2;const e=V.length;D("NumGet("),W(1),D(","),W(2),D(","),3===e?W(3):D('"UPtr"'),D(")"),H()}else if("objgetaddress"===r){if(Q())return 2;W(1),D("["),W(2),D("].Ptr"),H()}else if("objsetcapacity"===r){if(Q())return 2;3===V.length?(W(1),D("["),W(2),D(`]:=${n}(`),W(3),D(")"),H()):(D("ObjSetCapacity("),W(1),D(","),W(2),D(")"),H())}else if("objgetcapacity"===r){if(Q())return 2;if(2===V.length){const e=J(V[0]);if(e.length&&"[ Array"===e[0].type&&"] Array"===e[e.length-1].type){const t=V[1]=J(V[1]);if(3===t.length&&"Integer"===t[1].type&&"1"===t[1].text)return V[0]=e.slice(1,-1),D("VarSetStrCapacity("),W(1),D(")"),H(),3}W(1),D("["),W(2),D("].Size"),H()}else D("ObjGetCapacity("),W(1),D(")"),H()}else if("objhaskey"===r){if(Q())return 2;W(1),D(".Has("),W(2),D(")"),H()}else if("objrawset"===r){if(Q())return 2;W(1),D("["),W(2),D("]:="),W(3),H()}else if("objrawget"===r){if(Q())return 2;W(1),D("["),W(2),D("]"),H()}else for(;;){if(I=e[++T],!I)return 2;const t=I.type,i=G();if(3!==i){if(i)return i;if(") function CALL"===t)return 3}}}else if("(.) property findTrailingExpr"===L)"Integer"!==e[T-2].type&&(e[T-1].text="",k.text=`["${e[T].text}"]`,k.type="v2: arrAccess");else if("if"===L){N=T+2;let t=e[N];if(t){let i=!1;if("( if"===t.type){if(N++,t=e[N],!t)return 3;i=!0}if("start unit"===t.type&&ie("end unit","start unit"))return 2;if(t=e[N+(i?2:1)],t&&"end if"===t.type){if(N--,t=e[N],"] ArrAccess"===t.type){if(t.type="edit",t.text=")",!ne("[ ArrAccess","] ArrAccess"))return 2;const i=e[N];i.type="edit",i.text=".Has("}return 3}}}else if(c[L]){const t=e[T].text;if(-1===t.indexOf("%")&&"a_isunicode"===t.toLowerCase()){for(;N=T,te();){let t=T-1;if("? ternary"===e[N].type){I=e[N+1],I&&("emptyLines"!==I.type||I.text.includes("\n")||N++);const i=N+1;let n,r=!1;for(;N=T,ee();){"( group"===e[N].type&&(r=!0,t=N);break}if(N=i,!Y(": ternary"))break;const s=N,o=e[N-1];o&&("emptyLines"!==o.type||o.text.includes("\n")||N--);const f=N;if(N=s,r){if(ie(") group","( group"))break;n=N+1}else{if(!X(h))break;n=N}let l=n-t;return N=n,Z(),e[N].text.includes("\n")&&l--,e.splice(t,l,...e.slice(i,f)),3}break}k.text="true"}}else if("(statement) ,"===L){k.text=" ";const t=e[T+1];m[t.type]&&(k.text="")}else if(g[L])k.text="";else if(d[L]){const t=k.text;if(""!==t||"v1String findV1Expression"===L){let i,n="";N=T+1,i=e[N];e:for(;;){for(;i;){if(i.text){const e=i.text[0];w[e]||(n=" ");break e}i=e[++N]}break e}k.text=`${w[e[T-1].text.slice(-1)]?"":" "}"${t.replace(/"/g,'`"')}"${n}`}}else if("<>"===k.text&&"2operator"===L)k.text="!=";else{if("= v1Assignment"===L){k.text=":=";let t=e[++T];return t&&"whiteSpaces"===t.type&&(t=e[++T]),t&&b[t.type]||e.splice(T,0,{type:"v1String findV1Expression",text:""}),1}if("String"===L)k.text=`"${k.text.slice(1,-1).replace(/""/g,'`"')}"`;else if(a[L]){let t;const i=k.text.toLowerCase();if(o[i]){if(function(t){if(B())return!0;{let t=0;e:for(;;){if(I=e[T],!I)return!0;const i=I.type;if(d[i]&&!isNaN(Number(I.text))){I.type="edit",T++;continue e}const n=G();if(1!==n){if(2===n)return!0;if(3!==n){if("end command"===i)return!1;if(v[i]&&(t++,1===t))return!1;T++}else T++}}}}())return 3}else if("mousegetpos"===i){if(function(t){if(B())return!0;{let t=0;e:for(;;){if(I=e[T],!I)return!0;const i=I.type;if(d[i]){I.type="edit",T++;continue e}const n=G();if(1!==n){if(2===n)return!0;if(3!==n){if("end command"===i)return!1;if(v[i]&&(t++,4===t))break e;T++}else T++}}}e:for(;;){if(I=e[T],!I)return!0;const t=I.type;if(d[t]&&!isNaN(Number(I.text))){I.type="edit",T++;continue e}const i=G();if(1!==i){if(2===i)return!0;if(3!==i){if("end command"===t)return!1;T++}else T++}}}())return 3}else if("mousemove"===i){if(_(3))return 3}else if("pixelsearch"===i){if(function(t,i){if(B())return!0;{let t=0;e:for(;;){if(I=e[T],!I)return!0;const i=I.type;if(d[i]){I.type="edit",T++;continue e}const n=G();if(1!==n){if(2===n)return!0;if(3!==n){if("end command"===i)return!1;if(v[i]&&(t++,2===t))break e;T++}else T++}}}let n=-1;e:for(;;){if(I=e[T],!I)return!0;const t=I.type;if(d[t]&&!isNaN(Number(I.text))){I.type="edit",T++;continue e}const i=G();if(1!==i){if(2===i)return!0;if(3!==i){if("end command"===t)return!1;if(v[t]&&(n++,6===n))return P("end command"),!1;T++}else T++}}}())return 3}else{if("setbatchlines"===i)return q(),1;if(f[i]){if(_(1))return 3}else if("listlines"===i){if(B())return 3;if("v1String findV1Expression"!==I.type)return 1;{const e=I.text;x[e.toLowerCase()]?(I.type="edit",I.text=x[e.toLowerCase()]):isNaN(Number(e))?(I.type="edit",I.text="0"):I.type="edit"}}else if("splitpath"===i){if(_(5))return 3}else if("stringtrimright"===i){if(B())return 3;if(function(){for(;;){if(I=e[++N],!I)return!0;const t=I.type;if(g[t])I.type="edit";else if(d[t])I.type="edit";else if("end command"===t)return!0}}(),K())return 2;W(1),D(":=SubStr("),W(2),D(",1,-"),W(3),D(")"),z(),H()}else if(t=l[i]){if(B())return 3;if(function(t){let i=1;for(;;){if(I=e[++N],!I)return!0;const n=I.type;if(g[n]||d[n])t[i]&&(I.type="edit");else if(v[n])i++;else if("end command"===n)return!0}}({1:!0,2:!0}),K())return 2;W(1),D(`:=${t}(`),W(2),U(",",3),W(3),D(")"),z(),H()}else{if("statusbargettext"===i)return R("StatusBarGetText");if("random"===i)return R("Random");if("iniread"===i)return R("IniRead");if("regread"===i)return R("RegRead");if("fileread"===i)return R("FileRead");if("filegetattrib"===i)return R("FileGetAttrib");if("filegettime"===i)return R("FileGetTime");if("filegetsize"===i)return R("FileGetSize");if("filegetversion"===i)return R("FileGetVersion");if("wingettitle"===i)return R("WinGetTitle");if("wingetclass"===i)return R("WinGetClass");if("wingettext"===i)return R("WinGetText");if("sysget"===i)return R("SysGet");if("envget"===i)return R("EnvGet");if("formattime"===i)return R("FormatTime");if("Sort"===i)return R("Sort");if("pixelgetcolor"===i){const e=T;if(_(3))return 3;if(T=e,K())return 2;W(1),D(":=PixelGetColor("),W(2),U(",",3),W(3),U(",",4);const t=V[3];let i;if(t&&(i=t.length))for(let e=0;e1&&W(2);for(let e=3,t=V.length+1;ei&&m[e[t].type];t--);return e.slice(i,t+1)}function K(){const t=T;T+=2;let i,n=T;const r=[];for(;;)for(;;){if(i=e[T],!i)return!0;const s=i.type,o=G();if(1!==o){if(2===o)return!0;if(3!==o){if("end command"===s){const i=T+1-t;return r.push(e.slice(n,T)),e.splice(t,i),T-=i,V=r,E=t,$=[],!1}v[s]&&(r.push(e.slice(n,T)),n=T+1),T++}else T++}}}function Q(){const t=T;T+=2;let i,n=T;const r=[];for(;;)for(;;){if(i=e[T],!i)return!0;const s=i.type,o=G();if(1!==o){if(2===o)return!0;if(3!==o){if(") function CALL"===s){const i=T+1-t;return r.push(e.slice(n,T)),e.splice(t,i),T-=i,V=r,E=t,$=[],!1}", function CALL"===s&&(r.push(e.slice(n,T)),n=T+1),T++}else T++}}}function X(t){let i;for(i=e[++N];i;){const n=i.type;if(t[n])return n;i=e[++N]}return!1}function Y(t){let i;for(i=e[++N];i;){if(i.type===t)return!0;i=e[++N]}return!1}function Z(){let t;for(t=e[--N];t;){if(void 0!==t.text)return!0;t=e[--N]}return!1}function ee(){let t;for(t=e[--N];t;){if("emptyLines"!==t.type&&void 0!==t.text)return!0;t=e[--N]}return!1}function te(){let t;for(t=e[++N];t;){if("emptyLines"!==t.type&&void 0!==t.text)return!0;t=e[++N]}return!1}function ie(t,i){let n,r=1;for(n=e[++N];n;){const s=n.type;if(r&&(s===t?r--:s===i&&r++,0===r))return!1;n=e[++N]}return!0}function ne(t,i){let n,r=1;for(;N--;){n=e[N];const s=n.type;if(r&&(s===t?r--:s===i&&r++,0===r))return!0}return!1}}})(),window.modifyEverythingToV2=n.default})(); \ No newline at end of file diff --git a/src/modifyEverythingToV2.ts b/src/modifyEverythingToV2.ts index 69113dc..36bbc95 100644 --- a/src/modifyEverythingToV2.ts +++ b/src/modifyEverythingToV2.ts @@ -555,17 +555,38 @@ export default (everything: ExtendedEverythingType,is_AHK_H = true): string => { if (getCommandParams()) { return 2 } a(1); p(`:=${objValue}(`); a(2); o(',',3); a(3); p(')') spaceIfComment(); s() + } else if (dTextLowered === 'statusbargettext') { + return commandFirstParamToFunction('StatusBarGetText') + } else if (dTextLowered === 'random') { + return commandFirstParamToFunction('Random') } else if (dTextLowered === 'iniread') { return commandFirstParamToFunction('IniRead') + } else if (dTextLowered === 'regread') { + return commandFirstParamToFunction('RegRead') + } else if (dTextLowered === 'fileread') { + return commandFirstParamToFunction('FileRead') + } else if (dTextLowered === 'filegetattrib') { + return commandFirstParamToFunction('FileGetAttrib') + } else if (dTextLowered === 'filegettime') { + return commandFirstParamToFunction('FileGetTime') + } else if (dTextLowered === 'filegetsize') { + return commandFirstParamToFunction('FileGetSize') + } else if (dTextLowered === 'filegetversion') { + return commandFirstParamToFunction('FileGetVersion') } else if (dTextLowered === 'wingettitle') { return commandFirstParamToFunction('WinGetTitle') - } else if (dTextLowered === 'random') { - // Random, OutputVar [, Min, Max] - // OutputVar:=Random([Min, Max]) - commandAllEdit() - if (getCommandParams()) { return 2 } - a(1); p(':=Random('); a(2); o(',',3); a(3); p(')') - spaceIfComment(); s() + } else if (dTextLowered === 'wingetclass') { + return commandFirstParamToFunction('WinGetClass') + } else if (dTextLowered === 'wingettext') { + return commandFirstParamToFunction('WinGetText') + } else if (dTextLowered === 'sysget') { + return commandFirstParamToFunction('SysGet') + } else if (dTextLowered === 'envget') { + return commandFirstParamToFunction('EnvGet') + } else if (dTextLowered === 'formattime') { + return commandFirstParamToFunction('FormatTime') + } else if (dTextLowered === 'Sort') { + return commandFirstParamToFunction('Sort') } else if (dTextLowered === 'pixelgetcolor') { // PixelGetColor, OutputVar, X, Y , Mode // Color := PixelGetColor(X, Y [, Mode])