Search found 400 matches

by newbieforever
13 Sep 2016, 14:44
Forum: Ask For Help
Topic: How to include a value (string) at the time of compilation?
Replies: 11
Views: 1288

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?
by newbieforever
07 Sep 2016, 10:01
Forum: Ask For Help
Topic: Clicktrough with ControlClick Topic is solved
Replies: 3
Views: 428

Re: Clicktrough with ControlClick Topic is solved

Thank you very much, Helgef!
by newbieforever
07 Sep 2016, 01:47
Forum: Ask For Help
Topic: Clicktrough with ControlClick Topic is solved
Replies: 3
Views: 428

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...
by newbieforever
05 Sep 2016, 04:44
Forum: Ask For Help
Topic: WinGetPos and Gui , Show
Replies: 4
Views: 667

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 ...
by newbieforever
05 Sep 2016, 02:11
Forum: Ask For Help
Topic: WinGetPos and Gui , Show
Replies: 4
Views: 667

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...
by newbieforever
01 Sep 2016, 10:42
Forum: Ask For Help
Topic: How to declare as global Var%Ext%?
Replies: 5
Views: 545

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?)
by newbieforever
01 Sep 2016, 07:49
Forum: Ask For Help
Topic: How to declare as global Var%Ext%?
Replies: 5
Views: 545

Re: How to declare as global Var%Ext%?

Is this really not possible, although Ext is a parameter of the function?
by newbieforever
01 Sep 2016, 02:25
Forum: Ask For Help
Topic: How to declare as global Var%Ext%?
Replies: 5
Views: 545

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!!!
}
by newbieforever
01 Sep 2016, 02:07
Forum: Ask For Help
Topic: Global variables & dereferencing (a newbie problem) Topic is solved
Replies: 8
Views: 1156

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...
by newbieforever
31 Aug 2016, 15:19
Forum: Ask For Help
Topic: Global variables & dereferencing (a newbie problem) Topic is solved
Replies: 8
Views: 1156

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...
by newbieforever
31 Aug 2016, 14:30
Forum: Ask For Help
Topic: Global variables & dereferencing (a newbie problem) Topic is solved
Replies: 8
Views: 1156

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...
by newbieforever
31 Aug 2016, 13:13
Forum: Ask For Help
Topic: Global variables & dereferencing (a newbie problem) Topic is solved
Replies: 8
Views: 1156

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...
by newbieforever
31 Aug 2016, 10:55
Forum: Ask For Help
Topic: Global variables & dereferencing (a newbie problem) Topic is solved
Replies: 8
Views: 1156

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...
by newbieforever
28 Aug 2016, 08:38
Forum: Ask For Help
Topic: Hotstrings and hotkeys "on the fly"
Replies: 6
Views: 820

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...
by newbieforever
28 Aug 2016, 08:02
Forum: Ask For Help
Topic: Hotstrings and hotkeys "on the fly"
Replies: 6
Views: 820

Re: Hotstrings and hotkeys "on the fly"

@Masonjar13:
Really? How here a variable can be used for the hotkey definition?

Code: Select all

hk := "^i"
hkdef := "MsgBox You triggered the hotkey %hk%!"
by newbieforever
28 Aug 2016, 07:42
Forum: Ask For Help
Topic: Hotstrings and hotkeys "on the fly"
Replies: 6
Views: 820

Hotstrings and hotkeys "on the fly"

I know already how to generate " fully dynamic" hotstrings (from two variables, hotstring itself and its definition string): https://autohotkey.com/board/topic/98728-dynamic-hotstrings/ So I assume that there is also a way to do the same for hotkeys... *) ??? *) Edited/Updated: Here the "definition ...
by newbieforever
27 Aug 2016, 09:10
Forum: Ask For Help
Topic: Active window MyApp.exe, not the app's gui MyApp?
Replies: 3
Views: 788

Re: Active window MyApp.exe, not the app's gui MyApp?

Helgef, thank you, very much for your answer. Yes, I do like this, but there are many things between Gui Show and WinGetTitle , of course. In the meantime maybe I have found the reason: The situation is that MyApp gui is displayed on top, but there are other guis involved, generated by clicks in MyA...
by newbieforever
27 Aug 2016, 06:07
Forum: Ask For Help
Topic: Active window MyApp.exe, not the app's gui MyApp?
Replies: 3
Views: 788

Active window MyApp.exe, not the app's gui MyApp?

I have to clear why this occurs in my project: I compile my MyApp.ahk to MyApp.exe. The app's main gui is called MyApp too. In the script I use its HwndId to check if it is the active window. In some situations (I don't know at the moment why, I am doing clicking, drag&drop etc. in the gui) I see th...
by newbieforever
24 Aug 2016, 05:26
Forum: Ask For Help
Topic: Value := Array[Key] Topic is solved
Replies: 2
Views: 449

Re: Value := Array[Key] Topic is solved

Thank you very much, Helgef!

Code: Select all

Array := {aa: 1, -2: 2}
Key1 := "aa", Key2 := "-2"
Val1 := Array[Key1]
Val2 := Array[Key2]
MsgBox Val1: %Val1%`r`nVal2: %Val2%
by newbieforever
24 Aug 2016, 03:46
Forum: Ask For Help
Topic: Value := Array[Key] Topic is solved
Replies: 2
Views: 449

Value := Array[Key] Topic is solved

I understand this:

Code: Select all

Array := {"aa": 1, "-2": 2}
Val1 := Array["aa"]
Val2 := Array["-4"]
Both is working.
What is wrong in the following, how it should be done correctly:

Code: Select all

Array := {"aa": 1, "-2": 2}
Key1 := "aa", Key2 := "-2"
Val1 := Array[Key1]
Val2 := Array[Key2]

Go to advanced search