Search found 48 matches
- 26 Aug 2018, 07:23
- Forum: Ask for Help (v1)
- Topic: Read / Write memory (beginner level)
- Replies: 20
- Views: 19542
Re: Read / Write memory (beginner level)
Try if this will work for you. I divided the code among several functions with self-explanatory names. Does it give you the right value for PlayerObjectPointer? If you want to read numbers of types other than "ptr", use the types that the NumGet() function uses: "short", "int", "uint", etc. SetForma...
- 26 Aug 2018, 02:13
- Forum: Ask for Help (v1)
- Topic: Read / Write memory (beginner level)
- Replies: 20
- Views: 19542
Re: Read / Write memory (beginner level)
Why do you need to allocate memory in the other process? It's necessary if you call some code in that process that can only work with local memory. But ReadProcessMemory works between processes.
- 26 Aug 2018, 01:29
- Forum: C/C++
- Topic: C++: AHK source code: demo functions
- Replies: 7
- Views: 5285
Re: C++: AHK source code: demo functions
I meant it would be best to keep changes to the original source as small as possible. For instance by keeping the additional code in separate files and #including them in the source files. Or just adding your files to the AutoHotkey project in VisualStudio. That way it would be easier to transfer yo...
- 25 Aug 2018, 22:38
- Forum: C/C++
- Topic: C++: AHK source code: demo functions
- Replies: 7
- Views: 5285
Re: C++: AHK source code: demo functions
That was clear from the very beginning.
- 24 Aug 2018, 05:52
- Forum: Ask for Help (v1)
- Topic: Pause with CTRL+Right Click
- Replies: 1
- Views: 710
Re: Pause with CTRL+Right Click
Code: Select all
^RButton:: Send, {Pause}
- 23 Aug 2018, 07:10
- Forum: Ask for Help (v1)
- Topic: Calling from another script Topic is solved
- Replies: 6
- Views: 1263
Re: Calling from another script Topic is solved
Yes, there is ambiguity in AutoHotkey because it has functions and commands. Functions are those you call with (). They take literals in "" and variables without %%. Commands take literals without "" and require %% if you pass the content of a variable rather than its name (in the latter case you us...
- 23 Aug 2018, 00:48
- Forum: Ask for Help (v1)
- Topic: Calling from another script Topic is solved
- Replies: 6
- Views: 1263
Re: Calling from another script Topic is solved
Why are the last three parameters (x,a,e) not in quotes? As far as I can see they are the names of keys, not variable names.
Also, putting hotkey definitions in a While block makes no sense. Remove it.
Also, putting hotkey definitions in a While block makes no sense. Remove it.
- 22 Aug 2018, 04:25
- Forum: C/C++
- Topic: C++: AHK source code: demo functions
- Replies: 7
- Views: 5285
Re: C++: AHK source code: demo functions
It's better to keep your functions in a separate file.jeeswg wrote: - Functions can be added to AutoHotkey by changing 3 files:
- Trivial additions are made to script.h and script.cpp.
- The function proper is added to script2.cpp.
- 20 Aug 2018, 06:07
- Forum: Ask for Help (v1)
- Topic: How do I temporarily 'protect' a variable/object.
- Replies: 2
- Views: 533
Re: How do I temporarily 'protect' a variable/object.
Are your threads real threads, or AutoHotkey threads that simply interrupt one another? Perhaps you could use the message queue of AutoHotkey for this synchronization by sending messages to its hidden window. Every function that uses the array would send a request message before its use and a releas...
- 16 Aug 2018, 13:34
- Forum: Ask for Help (v1)
- Topic: Calling from another script Topic is solved
- Replies: 6
- Views: 1263
Re: Calling from another script Topic is solved
Code: Select all
ToLeft(Mid,moka,x,a,e)
Code: Select all
if (%currentPosture% != "Droi" ) && (%opName% != "kimo") && (%opName% != "kraga")
- 16 Aug 2018, 13:25
- Forum: Ask for Help (v1)
- Topic: Read status of a toggle mode in a software
- Replies: 1
- Views: 647
Re: Read status of a toggle mode in a software
If that mode is the same for all windows, put its initial state in a variable and toggle it each time you press Ctrl+Shift. That way you will know its current state. If it's different for each window, then it's more complex because you will have to maintain such a variable for each window, but it's ...
- 14 Aug 2018, 00:38
- Forum: Ask for Help (v1)
- Topic: Script for en dash, em dash and plain text paste Topic is solved
- Replies: 2
- Views: 2233
Re: Script for en dash, em dash and plain text paste Topic is solved
Code: Select all
^- ; em dash
- 12 Aug 2018, 11:02
- Forum: Ask for Help (v1)
- Topic: Firing WinMinimize untill window is minimized
- Replies: 3
- Views: 932
Re: Firing WinMinimize untill window is minimized
Have you tried WinWaitActive? It seems to work.
- 11 Aug 2018, 09:18
- Forum: Ask for Help (v1)
- Topic: How to run multiple programs minimized?
- Replies: 3
- Views: 1475
Re: How to run multiple programs minimized?
It must be HWMonitor who asks, not the script. Apparently it's not launched through Task Scheduler even if the script that launches it is. Boostnote runs several processes. So the PID you get may not belong to the one controlling the window you want to minimize. Maybe "ahk_exe Boostnote.exe" would w...
- 11 Aug 2018, 04:56
- Forum: Ask for Help (v1)
- Topic: Script not working correctly if launched from Task Scheduler
- Replies: 11
- Views: 2985
Re: Script not working correctly if launched from Task Scheduler
Your AHK script can reload itself any time with the Reload command, but the problem is how it can figure out it's time to reload. If you knew which program is the culprit, the script could wait till its process appears and then reload itself. Other than that, I don't have any idea at the moment.
- 11 Aug 2018, 02:59
- Forum: Ask for Help (v1)
- Topic: Script not working correctly if launched from Task Scheduler
- Replies: 11
- Views: 2985
Re: Script not working correctly if launched from Task Scheduler
I can only guess. Maybe another program starts later and sets a keyboard hook and then receives your keypresses before AutoHotkey? What if you launch your script through a shortcut in the Startup folder? (C:\Users\%YourUserName%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup). Perhaps...
- 11 Aug 2018, 01:43
- Forum: Scripts and Functions (v1)
- Topic: Default Keyboard Lang
- Replies: 15
- Views: 15897
Re: Default Keyboard Lang
Yes. There is also INPUTLANGCHANGE_BACKWARD (4), so you can assign it to a second hotkey in case you want to toggle between just two of the three.
- 11 Aug 2018, 01:07
- Forum: Scripts and Functions (v1)
- Topic: Default Keyboard Lang
- Replies: 15
- Views: 15897
Re: Default Keyboard Lang
My code sends the message to the control that has keyboard focus, rather than to its parent (main) window. Yes, you can toggle between languages. ^1::ToggleInputLang() ToggleInputLang() { WinExist("A") ControlGetFocus, CtrlInFocus PostMessage, 0x50, 2,, %CtrlInFocus% } 0x50 is WM_INPUTLANGCHANGEREQU...
- 10 Aug 2018, 22:29
- Forum: Scripts and Functions (v1)
- Topic: Default Keyboard Lang
- Replies: 15
- Views: 15897
Re: Default Keyboard Lang
No, I didn't misunderstand you. Have you tested my code with those two windows? For me, it works in them.
- 10 Aug 2018, 09:23
- Forum: Scripts and Functions (v1)
- Topic: Default Keyboard Lang
- Replies: 15
- Views: 15897
Re: Default Keyboard Lang
If you just need to change the input language of the active window, try this: ^1::SetInputLang(0x0406) ; Danish ^2::SetInputLang(0x0409) ; English (USA) ^3::SetInputLang(0x0411) ; Japanese ^4::SetInputLang(0x0408) ; Greek SetInputLang(Lang) { WinExist("A") ControlGetFocus, CtrlInFocus PostMessage, 0...