Search found 506 matches
- 16 Sep 2016, 01:40
- Forum: Ask for Help (v1)
- Topic: How to pass (write) a string into a script file?
- Replies: 4
- Views: 1615
How to pass (write) a string into a script file?
How to pass (write) a string into a script file? I think this is a very common situation, but as a newbie I don't see where a concise, systematic, ready-to-use summary of a best solution for this problem could be find. Let us say, we need an Include.ahk file which will be used by a main script ( #I...
- 14 Sep 2016, 11:25
- Forum: Ask for Help (v1)
- Topic: How to include a value (string) at the time of compilation?
- Replies: 11
- Views: 2299
Re: How to include a value (string) at the time of compilation?
@Masonjar13: I understand in the meantime that RawRead must be used (although Read can work sometimes...'undefined behavior'), and I understand that writing the string to the Include.ahk with Value := "string" can't work (every linefeed would end the string). My next attempt was the continuation-sec...
- 14 Sep 2016, 03:47
- Forum: Ask for Help (v1)
- Topic: How to include a value (string) at the time of compilation?
- Replies: 11
- Views: 2299
Re: How to include a value (string) at the time of compilation?
@Masonjar13: Hm, it must be something incorrect in my terminology...I am a newbie... For me the question is absolutly clear: I have a small script, like above PrepareIncludeAhk.ahk, which I execute just before I compile the Main.ahk. The small script reads the content of a MyApp.exe and includes it ...
- 14 Sep 2016, 02:47
- Forum: Ask for Help (v1)
- Topic: How to include a value (string) at the time of compilation?
- Replies: 11
- Views: 2299
Re: How to include a value (string) at the time of compilation?
@Masonjar13: OK, maybe my terminology is incorrect. In the following example a content of an exe file is retrieved as a string in ahk, isn't it? It is done by Read, not RawRead, and it is working in the following sense: Subsequently (maybe much later, and whenever desired) this string can be used to...
- 14 Sep 2016, 01:17
- Forum: Ask for Help (v1)
- Topic: How to include a value (string) at the time of compilation?
- Replies: 11
- Views: 2299
Re: How to include a value (string) at the time of compilation?
@Masonjar13: Thank you very much for your hints! I understand the FileInstall approach, and I probably will use it if there is no better solution. I would speculate that also #Include could be a way... This works perfectly: ; Save this script as PrepareIncludeAhk.ahk and run it. ; After this compile...
- 13 Sep 2016, 15:02
- Forum: Ask for Help (v1)
- Topic: How to include a value (string) at the time of compilation?
- Replies: 11
- Views: 2299
Re: How to include a value (string) at the time of compilation?
@Masonjar13:
The file which content I need is available only at the time of compilation, and the compiled script should be the only file which includes all necessary things.
The file which content I need is available only at the time of compilation, and the compiled script should be the only file which includes all necessary things.
- 13 Sep 2016, 14:44
- Forum: Ask for Help (v1)
- Topic: How to include a value (string) at the time of compilation?
- Replies: 11
- Views: 2299
How to include a value (string) at the time of compilation?
My script should be compiled. At the time of compilation a value should be included into the script (content of a binary file, which exist only at this time, retrieved by file.open(..., "r")) to be permanently available in the compiled script.
Can this be done?
Can this be done?
- 07 Sep 2016, 10:01
- Forum: Ask for Help (v1)
- Topic: Clicktrough with ControlClick Topic is solved
- Replies: 3
- Views: 739
Re: Clicktrough with ControlClick Topic is solved
Thank you very much, Helgef!
- 07 Sep 2016, 01:47
- Forum: Ask for Help (v1)
- Topic: Clicktrough with ControlClick Topic is solved
- Replies: 3
- Views: 739
Clicktrough with ControlClick Topic is solved
I have a small non-active semitransparent '+E0x20' gui on top of another gui. I can click through the small gui by mouse clicks (without activating it!), but the same should work with ControlClick. In the example below this doesn't work: ControlClick activates the small gui (I dont want this), but t...
- 05 Sep 2016, 04:44
- Forum: Ask for Help (v1)
- Topic: WinGetPos and Gui , Show
- Replies: 4
- Views: 1133
Re: WinGetPos and Gui , Show
@GEV: I am using CoordMode, Mouse, Screen! The problem seems to be that all Windows' windows (I am using Win10) seems to have an invisible (slightly shaddowed) outer border, i.e. the real window is larger than the visible. The X difference in my case is Diff = 11. So the visual left upper corner of ...
- 05 Sep 2016, 02:11
- Forum: Ask for Help (v1)
- Topic: WinGetPos and Gui , Show
- Replies: 4
- Views: 1133
WinGetPos and Gui , Show
What am I doing wrong? WinGetPos retrieves the coordinates of a window on the screen, e.g. WinX, WinY Gui,-Caption Gui, Show, x%WinX% y%WinY% w3 h3 Why this is not a small square exctly on the left upper corner of the window, but somewhere left of it? I have the same problem then with MouseClick pos...
- 01 Sep 2016, 10:42
- Forum: Ask for Help (v1)
- Topic: How to declare as global Var%Ext%?
- Replies: 5
- Views: 935
Re: How to declare as global Var%Ext%?
@Guest: Thank you!
There would be other variables needed as global, not only the array.
@Helgef: Thank you!
A very nice workaround, I will use it.
(A direct way is not possible at all, is this correct?)
There would be other variables needed as global, not only the array.
@Helgef: Thank you!
A very nice workaround, I will use it.
(A direct way is not possible at all, is this correct?)
- 01 Sep 2016, 07:49
- Forum: Ask for Help (v1)
- Topic: How to declare as global Var%Ext%?
- Replies: 5
- Views: 935
Re: How to declare as global Var%Ext%?
Is this really not possible, although Ext is a parameter of the function?
- 01 Sep 2016, 02:25
- Forum: Ask for Help (v1)
- Topic: How to declare as global Var%Ext%?
- Replies: 5
- Views: 935
How to declare as global Var%Ext%?
How to declare as global variables in this special case?
Code: Select all
Function(Ext)
{
global Var%Ext%
global Array%Ext% := Object()
; Other variables used in function should not be global!!!
}
- 01 Sep 2016, 02:07
- Forum: Ask for Help (v1)
- Topic: Global variables & dereferencing (a newbie problem) Topic is solved
- Replies: 8
- Views: 2216
Re: Global variables & dereferencing (a newbie problem) Topic is solved
OK, I understand now! Thank you very much, Ronins and guest3456! MakeGlobalStrings() Valy := Object() ; !!! Valx := Val[1] ; OK msgbox %Valx% ;msgbox %Val[2]% ; xxx msgbox % Val[2] ; OK loop, 3 ;Valy[%A_Index%] := Val[A_Index] ; xxx Valy[A_Index] := Val[A_Index] ; ;msgbox %Valy[3]% ; xxx msgbox % Va...
- 31 Aug 2016, 15:19
- Forum: Ask for Help (v1)
- Topic: Global variables & dereferencing (a newbie problem) Topic is solved
- Replies: 8
- Views: 2216
Re: Global variables & dereferencing (a newbie problem) Topic is solved
Still not understanding... > ??? ??? MakeGlobalStrings() Valx := Val[1] ; OK msgbox %Valx% ;msgbox %Val[1]% ; xxx msgbox % Val[1] ; OK !!! loop, 3 ;Valy[%A_Index%] := Val[A_Index] ; xxx Valy[A_Index] := Val[A_Index] ; ??? ??? ;msgbox %Valy[1]% ; xxx msgbox % Valy[1] ; ??? ??? return MakeGlobalString...
- 31 Aug 2016, 14:30
- Forum: Ask for Help (v1)
- Topic: Global variables & dereferencing (a newbie problem) Topic is solved
- Replies: 8
- Views: 2216
Re: Global variables & dereferencing (a newbie problem) Topic is solved
Ok, totally misunderstud the doc... There are still quetsions which I am unable to clear Make4GlobalStrings() MsgBox %Check% ; OK Valx := Val[1] ; OK msgbox >>> %Valx% msxbox >>> %Val[1]% ; ??? loop, 3 Valy[%A_Index%] := Val[A_Index] ; ??? msgbox >>> %Valy[1]% ; ??? return Make4GlobalStrings() { glo...
- 31 Aug 2016, 13:13
- Forum: Ask for Help (v1)
- Topic: Global variables & dereferencing (a newbie problem) Topic is solved
- Replies: 8
- Views: 2216
Re: Global variables & dereferencing (a newbie problem) Topic is solved
Wonderfull, thank you very much, Ronins. I will use this methods in the future.
But I still would like to understand the issues described in my first posting...
But I still would like to understand the issues described in my first posting...
- 31 Aug 2016, 10:55
- Forum: Ask for Help (v1)
- Topic: Global variables & dereferencing (a newbie problem) Topic is solved
- Replies: 8
- Views: 2216
Global variables & dereferencing (a newbie problem) Topic is solved
The variables inside my function only partly should be global. Are variables produced with A_Index not global automatically? If not, how to make them global? Or do I use a wrong syntax when derefencing outside the function? Thak you very much in advance! Make4GlobalStrings() MsgBox %Check% ; OK Valx...
- 28 Aug 2016, 08:38
- Forum: Ask for Help (v1)
- Topic: Hotstrings and hotkeys "on the fly"
- Replies: 6
- Views: 1753
Re: Hotstrings and hotkeys "on the fly"
@Masonjar13: Thank you very much. Ok, I improve my terminology: I would like that a script reads two variables from a file. The first is the hotkey itself, the second is a string containing ahk commands to be executed when the hotkey is applied...let us call it the commands string. This is not neces...