For example, for a script which does not use GUI commands,
#exclude GUIthen the commands and the functions related to GUI won't be available in the script but it saves the size of the script.
#exclude GUIthen the commands and the functions related to GUI won't be available in the script but it saves the size of the script.
Reducing sizes is practical. Otherwise, we don't need any compressors.I really don't think that's practical.
There's no feasable way to remove features from the byte code.
Then it's feasible.HotKeyIt made a DLL version of AutoHotkey. One build of it is called 'mini' which removes a lot of those features and provides smaller size and faster load times.
No. It's only do-able by compiling your own AutoHotkeySC.bin with a C++ compiler. It can't be done at script compile time.Then it's feasible.
So it's feasible. I'm not interested in listening technical excuses but how it can be achieved.It's only do-able
Ok. Here's what you need:I'm not interested in listening technical excuses but how it can be achieved.
But you ask someone to implement that feature for you. New features are implemented only if the benefit overweights the costs and your suggestion would be very seldom needed. Technical problems, time and knowledge can make it pain to implement a feature you asked. I personally don`t see any need for this. We have nothing against fresh or simple and effective ideas.So it's feasible. I'm not interested in listening technical excuses but how it can be achieved.It's only do-able
No signature.
<!-- m -->http://www.autohotke... ... Q#Portable<!-- m -->If you need many portable scripts, then why not making a single portable starter script, which runs the original ahk script with the AutoHotkey.exe interpreter.
How did you measure that? It could be so only for you but would not be for others.your suggestion would be very seldom needed.
Then don't implement it if you are an developer of AHK. My suggestion and the idea is for those who understand the benefits.Technical problems, time and knowledge can make it pain to implement a feature you asked.
Sizes of compiled scripts become important when they are distributed. The bigger the sizes are, the more they consume the server resources.Why is the size of the compiled scripts that important to you?
Me? no, my users do. And they don't want to spend their valuable time to learn unnecessary programming matters. Simpler, the better.If you need many portable scripts
Same question back.How did you measure that? It could be so only for you but would not be for others.your suggestion would be very seldom needed.
I am not an developer of AutoHotkey. Its perfectly ok to suggest something. But its perfectly ok too, to speak one's mind. So I did.Then don't implement it if you are an developer of AHK. My suggestion and the idea is for those who understand the benefits.
Ok, thats a good reason (for end user). In my case, If I distributed scripts in exe form, I never had problems with it and no one asked for size. To me personally, the size is ok.Sizes of compiled scripts become important when they are distributed. The bigger the sizes are, the more they consume the server resources.
Thats true. I had just gave a workaround example. But I do not understand why your consumer should need learn anything for that? But that is all another story. Its off-topic here.Me? no, my users do. And they don't want to spend their valuable time to learn unnecessary programming matters. Simpler, the better.
No signature.
How much would you expect to save? My uneducated guess is a few KB on a total of a few hundred KB. Get real.Sizes of compiled scripts become important when they are distributed. The bigger the sizes are, the more they consume the server resources.
Looking at the the two versions of AutoHotkey.dll, which are essentially AutoHotkey_L, specifically the 32bit Unicode for this example (most common); here's the differences.How much would you expect to save? My uneducated guess is a few KB on a total of a few hundred KB. Get real.Sizes of compiled scripts become important when they are distributed. The bigger the sizes are, the more they consume the server resources.
Hotkey (as well as Hotkey + Hotstring functionality), Gui…, GuiControl[Get], Menu..., TrayIcon, FileInstall, ListVars, ListLines, ListHotkeys, KeyHistory, SplashImage, SplashText..., Progress, PixelSearch, PixelGetColor, InputBox, FileSelect and FolderSelect dialogs, Input, BlockInput MouseMove[Off], Build in variables related to Hotkeys and Icons as well as Gui, A_ThisHotkey..., A_IsSuspended, A_Icon....
Then don't generalize your personal opinion.Same question back.
New features are implemented only if the benefit overweights the costs
So you even don't know what the benefit is and what the costs are and was saying that.I am not an developer of AutoHotkey
You'll understand if you have a file donwloaded a thousand times a day and get complained by the hosting company to upgrade the plan which charges extra fees.I never had problems with it and no one asked for size.
Do I have to tell them to download and get AutoHotkey.exe, just in order to make my program lightweight? That would instantly lose their interests using the program. They don't want extra stuff and a complicated procedure to run a single program.I do not understand why your consumer should need learn anything for that?
It should depend on the developer's skill.How much would you expect to save? My uneducated guess is a few KB on a total of a few hundred KB. Get real.
#include <_Struct> PixelGetColor,c,335,49 ; MsgBox % c " ?= " PixelGetColor(335,49) MsgBox % A_IsAdmin() MsgBox % A_IPAddress(1) "`n" A_IPAddress(2) "`n" A_IPAddress(3) "`n" A_IPAddress(4) A_AhkDir(){ return SubStr(A_AhkPath,1,InStr(A_AhkPath,"\",1,0)-1) } A_CoordMode(Option,mode="~"){ static CoordModeToolTip:=0,CoordModePixel:=0,CoordModeMouse:=0,CoordModeCaret:=0,CoordModeMenu:=0 If mode=~ Return CoordMode%option% CoordMode%option%:=mode="Screen"?1:0 } PixelGetColor(aX,aY,aOptions=""){ global _Struct ErrorLevel:=0 ;Set default ErrorLevel. if !A_CoordMode("Pixel") ;Using relative vs. screen coordinates. { rect:=new _Struct("left,top,right,bottom") if (!DllCall("GetWindowRect","Uint",DllCall("GetForegroundWindow"),"UInt",rect[])) return aX += rect.left aY += rect.top } If InStr(Options,"Alt") use_alt_mode=1 If !(hdc:=(use_alt_mode ? DllCall("CreateDC","Str","DISPLAY","Uint",0,"Uint",0,"Uint",0) : DllCall("GetDC","Uint",0))) return color := DllCall("GetPixel","Uint",hdc,"UInt",aX,"Uint",aY) if (use_alt_mode) DllCall("DeleteDC","Uint",hdc) else DllCall("ReleaseDC","Uint",0,"Uint",hdc) Format:=A_FormatInteger SetFormat,Integer,H color:=(InStr(Options,"RGB") ? (((Color&255)<<16)+(((Color>>8)&255)<<8)+(Color>>16)) : (color)) SetFormat,Integer,%Format% If color=0x0 color:= "0x000000" else if Strlen(color)<8 color:=(Strlen(color)>4 ? "0x00" : "0x0000") SubStr(color,3) ErrorLevel=0 return color "" } A_ISAdmin(){ static SC_MANAGER_LOCK = 0x8,ERROR_SERVICE_DATABASE_LOCKED = 1055 h:=DllCall("Advapi32\OpenSCManager","UInt",0,"UInt",0,"UInt",SC_MANAGER_LOCK) If (h){ If lock:=DllCall("Advapi32\LockServiceDatabase","UPTR",h) return:=1,DllCall("Advapi32\UnlockServiceDatabase","UPTR",lock) else if (A_LastError=ERROR_SERVICE_DATABASE_LOCKED) return:=1 DllCall("Advapi32\CloseServiceHandle","UPTR",h) } return return?return:0 } A_IPAddress(adapter_index=1){ global _Struct static wsadata:=new _Struct("WORD wVersion,WORD wHighVersion,char szDescription[257],char szSystemStatus[129],USHORT iMaxSockets,USHORT iMaxUdpDg,char *lpVendorInfo"),temp:=VarSetCapacity(start,2),host_name:=new _Struct("char[256]"),inaddr:=new _Struct("{struct{uchar s_b1,uchar s_b2,uchar s_b3,uchar s_b4},struct{ushort s_w1,ushort s_w2},ulong S_addr}") if (DllCall("Ws2_32\WSAStartup","USHORT",1,"UInt", wsadata[])) ;Failed (it returns 0 on success). return -1 DllCall("Ws2_32\gethostname","UInt",host_name[],"Int", 256) lpHost:=Struct("UPTR *h_name,UPTR *h_aliases,short h_addrtype,short h_length,uint[4] *h_addr_list",DllCall("Ws2_32\gethostbyname","UInt",host_name[],"Cdecl UInt")) adapter_count=0 while (lpHost.h_addr_list[adapter_count+1]) ++adapter_count if (adapter_index > adapter_count) return "0.0.0.0" else { inaddr[]:=lpHost.h_addr_list[adapter_index] Return Asc(inaddr.s_b1) "." Asc(inaddr.s_b2) "." Asc(inaddr.s_b3) "." Asc(inaddr.s_b4) } }