addScript-#If Problem

Ask for help, how to use AHK_H, etc.
arcticir
Posts: 694
Joined: 17 Nov 2013, 11:32

addScript-#If Problem

03 Feb 2018, 09:03

The hot keys of my mouse gestures seem to have failed:

Code: Select all

#If choose(keys.L,1)
{
*LButton:: Down("L")
}
#If choose(keys.L,0)
{
*LButton up:: up("L") 
}
#If choose(keys.r,1)
{
*Rbutton:: Down("r")
}
#If choose(keys.r,0)
{
*Rbutton up:: up("r") 
}

Only "Lbutton" triggers the "choose" function. and returns the result of the error.
other hotkey is not responding.

I don't know what the "update" brings to the change, so I don't know how to modify it to make it normal. :shock:
arcticir
Posts: 694
Joined: 17 Nov 2013, 11:32

Re: addScript-#If Problem

13 Feb 2018, 10:03

Sorry, I have a very serious delay.

Code: Select all

f:=ahkdll()
f.new("#Persistent`nCriticalObject(" (&f) ").add(FileRead(`"1.ahk`"))`nreturn ")
MsgBox "Test"
ahkdll(r:=""){
	static dll
	if !dll
	UnZipRawMemory(LockResource(LoadResource(0,hRes:=FindResource(0,"F903E44B8A904483A1732BA84EA6191F",10))),SizeofResource(0,hRes),dll)
	return CriticalObject({"":r:=MemoryLoadLibrary(&dll)
		,"func":DynaCall(MemoryGetProcAddress(r,"ahkFunction"),"s==sssssssssss")
		,"post":DynaCall(MemoryGetProcAddress(r,"ahkPostFunction"),"i==sssssssssss")
		,"new":DynaCall(MemoryGetProcAddress(r,"ahktextdll"),"ut==sss")
		,"add":DynaCall(MemoryGetProcAddress(r,"addScript"),"ut==si")
		,"exec":DynaCall(MemoryGetProcAddress(r,"ahkExec"),"ut==sui")
		,"get":DynaCall(MemoryGetProcAddress(r,"ahkgetvar"),"s==sui")
		,"set":DynaCall(MemoryGetProcAddress(r,"ahkassign"),"ui==ss")
		,"sub":DynaCall(MemoryGetProcAddress(r,"ahkLabel"),"ui==sui")
		,"pause":DynaCall(MemoryGetProcAddress(r,"ahkPause"),"i==s")
		,"exit":DynaCall(MemoryGetProcAddress(r,"ahkTerminate"),"i==i")
		,"ready":DynaCall(MemoryGetProcAddress(r,"ahkReady"),"")
		,"reload":DynaCall(MemoryGetProcAddress(r,"ahkReload"),"i==i")})
}

1.ahk

Code: Select all

#If choose("L",1)
{
*LButton:: Down("L")
}
#If choose("L",0)
{
*LButton up:: up("L") 
}
#If choose("r",1)
{
*Rbutton:: Down("r")
}
#If choose("r",0)
{
*Rbutton up:: up("r") 
}
up(a){

}
down(a){

}
choose(s,a){
ToolTip s
}
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: addScript-#If Problem

17 Feb 2018, 09:48

This should be fixed, let me know if it works now!
arcticir
Posts: 694
Joined: 17 Nov 2013, 11:32

Re: addScript-#If Problem

25 Feb 2018, 23:50

Thanks, it's normal now.

Return to “Ask for Help”

Who is online

Users browsing this forum: No registered users and 23 guests