Search found 50 matches

by DarkSider
25 Nov 2021, 08:57
Forum: Ask for Help (v1)
Topic: #if Topic is solved
Replies: 4
Views: 1539

#if Topic is solved

Trying to use #if in a short script, which should toggle it on/off when pressing / key

Code: Select all

#if (gameon = "True")
msgbox, x %gameon%

#if


\::
{
if (gameon = "True")
{
gameon := False
}
else
{
gameon := True
}
return
}
Not sure what's wrong O.O
by DarkSider
22 Nov 2021, 04:42
Forum: 脚本函数
Topic: AHK源代码加密器 v3.3
Replies: 148
Views: 141373

Re: AHK源代码加密器 v3.2

Hi, the script works but i'm trying to make it work on a file which should be executed as administrator. I got this test script which works both as .ahk or compiled before encrypting. However after encryption, i get the same error as user above me #Singleinstance Force full_command_line := DllCall("...
by DarkSider
22 Nov 2021, 04:10
Forum: Ask for Help (v1)
Topic: Run as admin
Replies: 2
Views: 512

Re: Run as admin

Thanks for reply. By encrypt i meant encrypting with the second link i put in my previous post. However i did have problem with just compiling, before going to the encrypt ^^ I just found this Compiled scripts would use a different approach. See https://www.autohotkey.com/docs/commands/Run.htm#RunAs...
by DarkSider
22 Nov 2021, 03:28
Forum: Ask for Help (v1)
Topic: Run as admin
Replies: 2
Views: 512

Run as admin

Hi, I tryed to encrypt a script which should run as administrator, but all my attempts give errors. I followed this example https://www.autohotkey.com/boards/viewtopic.php?t=21278 and I changed A_ScriptDir to A_WorkingDir so it will work with https://www.autohotkey.com/boards/viewtopic.php?f=28&t=42...
by DarkSider
15 Nov 2021, 04:16
Forum: Ask for Help (v1)
Topic: Comma in Strreplace
Replies: 2
Views: 306

Re: Comma in Strreplace

Sorry i just forgot to declare the new variable *blush*
by DarkSider
15 Nov 2021, 04:09
Forum: Ask for Help (v1)
Topic: Comma in Strreplace
Replies: 2
Views: 306

Comma in Strreplace

Hi, how can i replace a string which contains a comma ? I tryed this way and putting the needle and replace text in variables, escape the comma but all don't work :D

Edit : nobody saw that :D
by DarkSider
13 Nov 2021, 18:59
Forum: Gaming Help (v1)
Topic: Click ingame without interfering with the cursor
Replies: 2
Views: 549

Re: Click ingame without interfering with the cursor

I did look into it, but i didn't manage to get it to work, cheers :)
by DarkSider
13 Nov 2021, 10:45
Forum: Gaming Help (v1)
Topic: Click ingame without interfering with the cursor
Replies: 2
Views: 549

Click ingame without interfering with the cursor

Hi, is it possible to click ingame without interfering with the mouse cursor ? I made this script which will interrupt the natural ingame move of the cursor and feel a bit awkward. Any way to improve that ? Can a click on pixel command be sent without moving the cursor ? f:: { Blockinput, Mousemove ...
by DarkSider
09 Nov 2021, 21:39
Forum: Ask for Help (v1)
Topic: value of value Topic is solved
Replies: 3
Views: 400

Re: value of value Topic is solved

Thanks, that was embarassing :D
by DarkSider
09 Nov 2021, 21:32
Forum: Ask for Help (v1)
Topic: value of value Topic is solved
Replies: 3
Views: 400

value of value Topic is solved

Hi, what's the syntax that i'm looking for ? Is it possible to use the value of (value -200) ? I know i could set x to x - 200 first, but was wondering if there's a quicker way ^^

Code: Select all

Iniread, x, buildings.ini, tent, x
Iniread, y, buildings.ini, tent, y

j::
{
mousemove, % [%x% - 200], %y%
}
by DarkSider
09 Nov 2021, 21:29
Forum: Ask for Help (v1)
Topic: Global variable help
Replies: 2
Views: 356

Re: Global variable help

nvm i got this one :D
by DarkSider
09 Nov 2021, 19:27
Forum: Ask for Help (v1)
Topic: Global variable help
Replies: 2
Views: 356

Global variable help

I'm trying to read a bunch of ini values at once, and use them at a later date in functions. I can't quite figure out the global variable thingie :(

Code: Select all

loadvalues()
{
global
Iniread, result, buildings.ini, tent, defx
}
 

f::
{
msgbox, value : %result%
}
by DarkSider
02 Nov 2021, 08:32
Forum: Gaming Help (v1)
Topic: Subrutine executed on sequence of 2 keys Topic is solved
Replies: 7
Views: 688

Re: Subrutine executed on sequence of 2 keys Topic is solved

Still struggling :( The code works, if i press a followed by 1, 2 or 3 works as intended. But i need it to be fool proof, so if by accident it's pressed aa1 it won't work. I tryed to start the script with the endkey, so if the a key it's pressed twice, the second time will close the input of the fir...
by DarkSider
02 Nov 2021, 07:41
Forum: Gaming Help (v1)
Topic: Subrutine executed on sequence of 2 keys Topic is solved
Replies: 7
Views: 688

Re: Subrutine executed on sequence of 2 keys Topic is solved

Switch [v1.1.31+]

Just figured out why switch wasn't working for me :D
by DarkSider
02 Nov 2021, 07:16
Forum: Gaming Help (v1)
Topic: Ifwinactive
Replies: 5
Views: 802

Re: Ifwinactive

I meant i tryed something similar to what you wrote from the 20 different styles, with ahk_class and ahk_exe and without them, but i guess when i tryed without them i didn't put # before Ifwinactive.
by DarkSider
02 Nov 2021, 07:13
Forum: Gaming Help (v1)
Topic: Subrutine executed on sequence of 2 keys Topic is solved
Replies: 7
Views: 688

Re: Subrutine executed on sequence of 2 keys Topic is solved

Your code obviously works :@ Thanks.
But what was wrong in my attempt ?
by DarkSider
02 Nov 2021, 07:08
Forum: Gaming Help (v1)
Topic: Subrutine executed on sequence of 2 keys Topic is solved
Replies: 7
Views: 688

Re: Subrutine executed on sequence of 2 keys Topic is solved

I have this which it's not very far from that idea i guess, but it tells me ( case "1" ) it's not a recognized function a:: { Input, combo, L2 T2,,1,2,3 switch [combo] { case "1": msgbox, You pressed a followed by 1 case "2": msgbox, You pressed a followed by 2 case "3": msgbox, You pressed a follow...
by DarkSider
02 Nov 2021, 05:35
Forum: Gaming Help (v1)
Topic: Subrutine executed on sequence of 2 keys Topic is solved
Replies: 7
Views: 688

Subrutine executed on sequence of 2 keys Topic is solved

I'm back :D So this time i'm struggling to run separate miniscripts depending of the 2 last keystrokes used in a short interval sequence (not key combination). For example f followed by a should msgbox "you pressed fa" while f followed by s should msgbox "you pressed fs" 1:: { #InstallKeybdHook msgb...
by DarkSider
02 Nov 2021, 01:31
Forum: Gaming Help (v1)
Topic: Ifwinactive
Replies: 5
Views: 802

Re: Ifwinactive

I think i tryed 5 times last night a similar syntax to yours before posting, but obviously yours works.
Thanks.
by DarkSider
01 Nov 2021, 20:17
Forum: Gaming Help (v1)
Topic: Ifwinactive
Replies: 5
Views: 802

Ifwinactive

I'm trying to detect if the game "They are Billions" it's the active window, but i'm struggling :(

Code: Select all

#Ifwinactive, ahk_exe TheyAreBillions.exe
f3::
{
 msgbox, game active
return
}
#Ifwinactive
doesn't work, i also tryed ahk_class They are Billions

and window spy gives me this image.

Go to advanced search