Search found 2337 matches

by HotKeyIt
19 Jul 2021, 17:30
Forum: Ask for Help
Topic: Help with AutoHotkey.DLL and StrReplace or StringReplace
Replies: 4
Views: 2421

Re: Help with AutoHotkey.DLL and StrReplace or StringReplace

You need #Persistent.
Also ahktextdll returns thread handle!

Code: Select all

hThread := ahk.ahktextdll("#Persistent`nout:=strreplace(""You are a primate"", ""primate"", ""fat monkey"")")
While !out:=ahk.ahkgetvar("out")
  Sleep 100
ahk.ahkterminate()
MsgBox %out%
by HotKeyIt
07 Jul 2021, 15:17
Forum: Scripts and Functions (v1)
Topic: WinWaitCreated() - Wait for a new window
Replies: 32
Views: 16203

Re: WinWaitCreated() - Wait for a new window

The windows inside GIMP are like Controls, so you will rather need a ControlWaitCreated function!
by HotKeyIt
02 Jul 2021, 16:08
Forum: Ask for Help
Topic: Need help with VBS using AutoHotkey.dll Topic is solved
Replies: 11
Views: 5143

Re: Need help with VBS using AutoHotkey.dll Topic is solved

This works fine for me with C:\Windows\System32\cscript.exe C:\ahk.vbs

Code: Select all

Set AhkCom = CreateObject("AutoHotkey.Script.X64")
AhkCom.ahktextdll ("MsgBox 'Hello World!'")
While AhkCom.ahkready()
    WScript.Sleep (100)
Wend
by HotKeyIt
02 Jul 2021, 10:55
Forum: Ask for Help
Topic: Need help with VBS using AutoHotkey.dll Topic is solved
Replies: 11
Views: 5143

Re: Need help with VBS using AutoHotkey.dll Topic is solved

For 32-bit you should use:

Code: Select all

Set AhkCom = CreateObject("AutoHotkey.Script.UNICODE")
AhkCom.ahktextdll ("MsgBox 'Hello World!'")
While AhkCom.ahkready()
    WScript.Sleep (100)
Wend
by HotKeyIt
02 Jul 2021, 08:03
Forum: Ask for Help
Topic: Need help with VBS using AutoHotkey.dll Topic is solved
Replies: 11
Views: 5143

Re: Need help with VBS using AutoHotkey.dll Topic is solved

Try

Code: Select all

set AhkCom = CreateObject("AutoHotkey.Script.X64")
AhkCom.ahktextdll("MsgBox 'Hello World!'")
While AhkCom.ahkready()
    WScript.Sleep(100)
Wend
by HotKeyIt
01 Jul 2021, 14:11
Forum: Ask for Help
Topic: Need help with VBS using AutoHotkey.dll Topic is solved
Replies: 11
Views: 5143

Re: Need help with VBS using AutoHotkey.dll Topic is solved

Works fine for me, did you register 64 and 32 dll, also note you have to run regsvr32 as admin to register the dll.
E.g. start cmd as admin and run regsvr32 "C:\Scratch\Program Files\AutoHotkey\x64w\AutoHotkey.dll"
by HotKeyIt
01 Jul 2021, 10:57
Forum: Ask for Help
Topic: Need help with VBS using AutoHotkey.dll Topic is solved
Replies: 11
Views: 5143

Re: Need help with VBS using AutoHotkey.dll Topic is solved

Try:

Code: Select all

set AhkCom = CreateObject("AutoHotkey.Script")
AhkCom.ahktextdll("MsgBox 'Hello World!'")
While AhkCom.ahkready()
    WScript.Sleep(100)
Wend
by HotKeyIt
14 Jun 2021, 18:00
Forum: Ask for Help (v1)
Topic: BoundFunc Object Topic is solved
Replies: 2
Views: 291

Re: BoundFunc Object Topic is solved

Because second parmeter is not optional!

Code: Select all

NotepadMin := Func("Run").Bind("notepad.exe", , "Min")
%NotepadMin%()
Run(Target, WorkingDir:="", Options:="") {
    Run, % Target, % WorkingDir, % Options
}
by HotKeyIt
27 Apr 2021, 21:22
Forum: Ask for Help
Topic: AHK Compiler <error>
Replies: 24
Views: 10259

Re: AHK Compiler <error>

Which version are you using, did you try to compile/run from fresh download in a separate folder?
by HotKeyIt
17 Apr 2021, 15:39
Forum: AutoHotkey_H
Topic: Latest Ahk2Exe - good for any other versions of AHK_H?
Replies: 4
Views: 3145

Re: Latest Ahk2Exe - good for any other versions of AHK_H?

1. No
2. Yes
Any folder structure should work for exe and dll.
by HotKeyIt
12 Apr 2021, 05:43
Forum: Ask for Help (v1)
Topic: RegExMatch with Mode 3 returns 0 occurances in string Topic is solved
Replies: 7
Views: 563

Re: RegExMatch with Mode 3 returns 0 occurances in string Topic is solved

You need to use () for subpattern:

Code: Select all

String =
(
Lorem. ipsum dolor. sit 
amet, consectetur. 
adipiscing elit, sed. do 
eiusmod.
)

RegExMatch(String, "O)(\.)?.*(\.)?.*(\.)?.*(\.)?.*(\.)?.*(\.)?.*(\.)?.*(\.)?.*", dotArray)
numberOfDots := dotArray.Count()
msgbox % numberOfDots ; returns 0
by HotKeyIt
12 Apr 2021, 05:29
Forum: Wish List
Topic: Wait / Pause in Send()
Replies: 2
Views: 1443

Re: Wait / Pause in Send()

In AHK_H you can use:

Code: Select all

Send( "{a down}{33}{a up}{11}{b down}{33}{b up}" )
by HotKeyIt
02 Apr 2021, 10:37
Forum: Ask for Help (v1)
Topic: How to repeat a script every 3 hours
Replies: 6
Views: 595

Re: How to repeat a script every 3 hours

1000 ms = 1 Sec
60 Sec = 1 Min
60 Min = 1 Hour

Code: Select all

SetTimer, LoginDoStuff, % 3*60*60*1000

Code: Select all

hour:=60*min:=60*sec:=1000
SetTimer, LoginDoStuff, % 3*hour
by HotKeyIt
29 Mar 2021, 19:19
Forum: Ask for Help (v1)
Topic: Is it possible for comparing string("=") ? Topic is solved
Replies: 3
Views: 460

Re: Is it possible for comparing string("=") ? Topic is solved

Code: Select all

a := "="

if (a="=")
{
	Msgbox,Yes
}
else
{
	Msgbox,No
}
return

Go to advanced search