Search found 338 matches

by Spawnova
Yesterday, 17:01
Forum: Ask For Help
Topic: Better use ifwinactive or #ifwinactive
Replies: 5
Views: 55

Re: Better use ifwinactive or #ifwinactive

Ah, I see, that is indeed a lot of variables to consider.

In that case, personally I would still use WinGetTitle and just have a lot of if/else statements, possibly making a few functions to wrap common actions.

There may be a more efficient way, but I can't think of anything atm.
by Spawnova
Yesterday, 16:41
Forum: Ask For Help
Topic: Randomised RandomBezier's code?
Replies: 4
Views: 35

Re: Randomised RandomBezier's code?

Manjack40 wrote:does there just have to be one present in the entire script for each RandomBezier to pull from?


Correct, as long as it is present somewhere within your script, you can use the user defined function Random().
by Spawnova
Yesterday, 16:25
Forum: Ask For Help
Topic: Randomised RandomBezier's code?
Replies: 4
Views: 35

Re: Randomised RandomBezier's code?

A simple fix would simply to add a random value to your final x/y pos

Code: [Select all]GeSHi © Codebox Plus

RandomBezier( 0, 0, x+random(-10,10), y+random(-10,10), "" ) ;if your x was 500 this would end at 490-510, same as y

Random(min,max=100) {
random,result,min,max
return result
}
by Spawnova
Yesterday, 16:18
Forum: Gaming
Topic: Gui or MsgBox
Replies: 2
Views: 24

Re: Gui or MsgBox

gui,add,text,x5 y5 w150 h50 vtextHandle,some text here gui,show,x100 y100,Gui title return f1:: guicontrol,,textHandle,you pressed F1 ;update the text control return f2:: msgbox, you pressed F2 ;simple message box guicontrol,,textHandle,you pressed F2 and a message box appeared return Also check ou...
by Spawnova
Yesterday, 16:00
Forum: Ask For Help
Topic: Better use ifwinactive or #ifwinactive
Replies: 5
Views: 55

Re: Better use ifwinactive or #ifwinactive

I'd probably use wingettitle here's an example code that you may find usefull windows := [] windows["Notepad++"] := {username:"myName",password:"123abc",x:50,y:50} windows["Calculator"] := {username:"myName",password:"123abc",x:50,y:50} win...
by Spawnova
Yesterday, 13:12
Forum: Gaming
Topic: Scripting Help
Replies: 1
Views: 29

Re: Scripting Help

1 second == 1,000 milliseconds therefore, 10 minutes == 1,000 * 60 = 60,000 * 10 = 600,000ms assuming your program accepts controlsend, this should work for you, sending keystrokes to a background window. global procName := "BingBong.exe" ^q:: ;control q loop { sendInactive("F3")...
by Spawnova
Yesterday, 12:53
Forum: Gaming
Topic: Basic question
Replies: 2
Views: 51

Re: Basic question

*y:: If(!GetKeyState("Shift")) ;if NOT holding shift { ;if NOT holding shift do nothing } else { ;ELSE if holding shift send g } return The above is what the code translates to Looks like you had it backwards, a simple fix is just remove the ! or you can swap the code inside the brackets....
by Spawnova
Yesterday, 12:42
Forum: Gaming
Topic: Click in random x, y not working
Replies: 1
Views: 13

Re: Click in random x, y not working

random takes these parameters random,output, min , max you mixed your max and min here's a sample script that should work for you F2:: Coordmode, Mouse, Screen x := random(340,450) y := random(350,460) click,right,%x%,%y% return Random(min,max=100) { ;a wrapper for random, makes it easier to use ran...
by Spawnova
Yesterday, 12:37
Forum: Ask For Help
Topic: Looping 'MouseClick's while held. HELP?!?! Topic is solved
Replies: 4
Views: 46

Re: Looping 'MouseClick's while held. HELP?!?! Topic is solved

The initial click should be going through, however it won't perform a click up until you release left click. I did change one of your sleeps in the loop so the first loop click was immediate, however that may have caused the issue if you also need the original click. Try changing it to this ~*lbutto...
by Spawnova
Yesterday, 07:32
Forum: Gaming
Topic: Is this possible?
Replies: 1
Views: 30

Re: Is this possible?

Yes this is possible with PixelSearch Here's some basic code that may help coordmode,pixel,screen ;coords for pixelsearch are relative to screen if CheckColor(0,0,0x000000) { ;example usage msgbox The color BLACK (0x000000) was found at position 0,0 ;perform action } if CheckColor(50,50,0xFF0000) { ...
by Spawnova
Yesterday, 07:24
Forum: Gaming
Topic: i have a script that could do with some work Topic is solved
Replies: 1
Views: 36

Re: i have a script that could do with some work Topic is solved

You will need to add an asterisk * before the hotkey to tell it to ignore modifiers

Code: [Select all]GeSHi © Codebox Plus

*XButton2::
While GetKeyState("XButton2","p"){
Click
Sleep 10
}
return
by Spawnova
Yesterday, 07:19
Forum: Ask For Help
Topic: Looping 'MouseClick's while held. HELP?!?! Topic is solved
Replies: 4
Views: 46

Re: Looping 'MouseClick's while held. HELP?!?! Topic is solved

~*lbutton:: ;~ means do not block left click, * means works regardless of modifiers while(GetKeyState("lalt","P") and GetKeyState("lbutton","P")) { ;P == physically held MouseClick, Left, 865, 986, 1, 0.1 Sleep, 100 MouseClick, Left, 845, 182, 1, 0.1 Sleep, 1...
by Spawnova
15 Jan 2018, 18:28
Forum: Gaming
Topic: Minecraft /fixhand
Replies: 3
Views: 43

Re: Minecraft /fixhand

Code: [Select all] [Expand]GeSHi © Codebox Plus

by Spawnova
15 Jan 2018, 18:25
Forum: Gaming
Topic: Help me pls! VB code to Ahk
Replies: 1
Views: 27

Re: Help me pls! VB code to Ahk

Here's some resources that should help, if you understand the vb code, it should not be too difficult to convert to ahk with the below commands. PixelSearch - https://autohotkey.com/docs/commands/PixelSearch.htm Send - https://autohotkey.com/docs/commands/Send.htm Click - https://autohotkey.com/docs...
by Spawnova
15 Jan 2018, 18:15
Forum: Gaming
Topic: Switch numpad with mouseclick
Replies: 1
Views: 25

Re: Switch numpad with mouseclick

numpadToggle := 2 running := false #if running lbutton:: send {numpad%numpadToggle%} numpadToggle := (numpadToggle = 2 ? 3 : 2) return #if ^b::running := !running ^n::exitapp Here's the same code but with comments, explaining what things do. numpadToggle := 2 ;variable numpadToggle has a value of 2...
by Spawnova
15 Jan 2018, 17:54
Forum: Gaming
Topic: Possible Bug with Backslashes in notepad Topic is solved
Replies: 4
Views: 74

Re: Possible Bug with Backslashes in notepad Topic is solved

I'm not sure about that sorry, however I would strongly recommend using a different editor. Here are 2 great choices Notepad++: https://autohotkey.com/boards/viewtopic.php?t=50 SciTE4AutoHotKey: https://fincs.ahk4.net/scite4ahk/ Normal Notepad isn't built for scripting, the 2 programs I've listed ar...
by Spawnova
15 Jan 2018, 17:49
Forum: Gaming
Topic: Needed Script
Replies: 1
Views: 35

Re: Needed Script

Code: [Select all]GeSHi © Codebox Plus

f1::  ;hotkey = F1, to activate the below code
loop 10 {
send q
sleep 30 ;sleep 30ms after each press (1000ms = 1 second)
}
send {c down}
sleep 10000 ;1000 = 1 second, so 10000 = 10 seconds
send {c up}
return
by Spawnova
15 Jan 2018, 17:46
Forum: Ask For Help
Topic: "Click And Move" Help Topic is solved
Replies: 1
Views: 27

Re: "Click And Move" Help Topic is solved

I'm not sure exactly what you were asking, but this code may help. coordmode,mouse,screen ;mouse is relative to screen f1:: ;hotkey to hold lbutton down mousegetpos,x,y click,down return #if getkeystate("lbutton") ;since lbutton is held down, intercept left click lbutton:: click,up mousemo...
by Spawnova
30 Dec 2017, 07:04
Forum: Ask For Help
Topic: keybind for starting script over
Replies: 2
Views: 70

Re: keybind for starting script over

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starti...
by Spawnova
13 Dec 2017, 15:44
Forum: Ask For Help
Topic: Global variable inside the function
Replies: 3
Views: 72

Re: Global variable inside the function

I don't think you can use global like that, however this works exactly the same

Code: [Select all]GeSHi © Codebox Plus

mySetting1 := true
mySetting2 := true

#If mySetting1
f1:: msgbox mySettings1 = true
#If

f2::
mySetting1 := false
return

Go to advanced search