Search found 112 matches

by waetherman
01 Jun 2016, 14:22
Forum: Ask for Help (v1)
Topic: Click in another window
Replies: 5
Views: 1709

Re: Click in another window

Shadowpheonix wrote:Try the ControlClick, Toolbar321, WinTitle,,,, NA format as explained in the Reliability section of the ControlClick documentation.
When I last tried it, it didn't work in Firefox and Chrome, but it worked in Internet Explorer - so now there's two reasons to use this browser.
by waetherman
01 Jun 2016, 13:25
Forum: Ask for Help (v1)
Topic: SetKeyDelay in Menu?
Replies: 10
Views: 2702

Re: SetKeyDelay in Menu?

Do you mean something like this? flag := true #q:: if ( flag ) { SetKeyDelay, 0, 0 } else { SetKeyDelay, 100, 100 } Send 0123456789 return #Space:: flag := !flag if ( flag ) { Tooltip, Fast typing } else { Tooltip, Slow typing } Sleep, 2000 Tooltip return Hope this helps, Marek Smoliński
by waetherman
01 Jun 2016, 13:09
Forum: Ask for Help (v1)
Topic: Variable name contains illegal character
Replies: 5
Views: 2909

Re: Variable name contains illegal character

Code: Select all

text = catDOGbee
magic := "text"

MsgBox text magic
MsgBox % text magic
MsgBox %text%magic

science := SubStr( %magic%, 4, 3 )

MsgBox % "Science: "science
Don't think too much why I named vars magic and science, there's no depth to it.
by waetherman
01 Jun 2016, 06:45
Forum: Ask for Help (v1)
Topic: Window Switching
Replies: 12
Views: 2963

Re: Window Switching

I'd also like to know the answer! I had a hard time with activating Windows, so I invented my own brute methods like this one: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #WinActivateForce ; #Warn ; Enable warnings to assist with detecting common errors. S...
by waetherman
30 May 2016, 12:55
Forum: Ask for Help (v1)
Topic: UndoHistory
Replies: 8
Views: 1871

Re: Undo Queue Associative Array

Funny thing is, an undo queue is not a queue. A queue is FIFO, as in real life: https://en.wikipedia.org/wiki/Queue_%28abstract_data_type%29 Undo is FILO, just like a stack: https://en.wikipedia.org/wiki/Stack_%28abstract_data_type%29 In AHK, an array has a functionality of a stack. A normal array. ...
by waetherman
30 May 2016, 11:29
Forum: Ask for Help (v1)
Topic: Starting a new program and firing a hot key in it
Replies: 17
Views: 3353

Re: Starting a new program and firing a hot key in it

Alright, so that's progress! Now I'd only recommend for you to try and change window_title to something less generic than "EDIT". The reason is, if You ever have a window with "EDIT" inside it's title (and it's not Spflite) then the script will not wait for Spflite. Not a big deal, unless you send s...
by waetherman
30 May 2016, 03:03
Forum: Ask for Help (v1)
Topic: Auto-Reloads in a Synced Folder, and the Attack of the Errors
Replies: 4
Views: 1434

Re: Auto-Reloads in a Synced Folder, and the Attack of the Errors

Well it's a typical scenario where if you break an app that auto-updates itself, it may no longer auto-update until fixed manually. That's why you should check an update before sending it to clients. You could have an updater script, which doesn't change, that updates the updated script which keeps ...
by waetherman
30 May 2016, 02:22
Forum: Ask for Help (v1)
Topic: How to make a key work different when it is pressed twice?
Replies: 5
Views: 2035

Re: How to make a key work different when it is pressed twice?

Does it really matter if the script pauses when it's going to reload anyways? :arrow: IMO No. ;) Obviously pausing itself and reloading itself is not the only thing the script will do ;) Unless it will, like a Google Chrome extension I once installed, which was named "Do Nothing" and delivered just...
by waetherman
30 May 2016, 02:17
Forum: Ask for Help (v1)
Topic: Starting a new program and firing a hot key in it
Replies: 17
Views: 3353

Re: Starting a new program and firing a hot key in it

We're not done, buddy :). It seems SPFLITE needs some time after it opens the window before it can access a key. Try this: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Recommended for catching common errors. #SingleInstance Force SendMode Event SetW...
by waetherman
29 May 2016, 16:47
Forum: Ask for Help (v1)
Topic: Starting a new program and firing a hot key in it
Replies: 17
Views: 3353

Re: Starting a new program and firing a hot key in it

So you don't have to wait 5 s for "winwait ended"? I'd say either you have another window with "EDIT" in title, or spflite has a starting period when it doesn't accept keys, or Send {f5} is not working.

Try this:

Code: Select all

#a::
Send {f5}
Does it work inside spflite?
by waetherman
29 May 2016, 16:12
Forum: Ask for Help (v1)
Topic: Starting a new program and firing a hot key in it
Replies: 17
Views: 3353

Re: Starting a new program and firing a hot key in it

With default settings you only need to match the beginning of the window title. Try this: #SingleInstance Force SendMode Event SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. window_title := "EDIT" #n:: Send Notes{Enter}{Enter} WinWait, %window_title%, , 5 MsgBox, winwait ende...
by waetherman
29 May 2016, 15:16
Forum: Ask for Help (v1)
Topic: Starting a new program and firing a hot key in it
Replies: 17
Views: 3353

Re: Starting a new program and firing a hot key in it

Try this: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Recommended for catching common errors. #SingleInstance Force SendMode Event SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. window_title := "File Manager - SPFLite" #n:: ...
by waetherman
29 May 2016, 15:10
Forum: Ask for Help (v1)
Topic: Beginnerproblem - Send
Replies: 2
Views: 770

Re: Beginnerproblem - Send

$ is what you have to use Quoting AHK documentation : This is usually only necessary if the script uses the Send command to send the keys that comprise the hotkey itself, which might otherwise cause it to trigger itself. The $ prefix forces the keyboard hook to be used to implement this hotkey, whi...
by waetherman
29 May 2016, 15:02
Forum: Ask for Help (v1)
Topic: Starting a new program and firing a hot key in it
Replies: 17
Views: 3353

Re: Starting a new program and firing a hot key in it

So you want to wait until the program opens? WinWait will help. Then if the window is active you can continue using Send or if the window is inactive, you can use ControlSend

Sorry for the vague answer, but I don't quite get what You want to achieve. What is PF5 key? Is "P" a typo?
by waetherman
29 May 2016, 14:56
Forum: Ask for Help (v1)
Topic: How to make a key work different when it is pressed twice?
Replies: 5
Views: 2035

Re: How to make a key work different when it is pressed twice?

Here is a different example approach: `:: if (A_PriorHotkey = A_ThisHotkey && A_TimeSincePriorHotkey < 400) reload else pause, Toggle, 1 return This is very elegant solution! Worth to note, though, that the script will get paused even if you double-press the ` . It could matter if, for example, you...
by waetherman
29 May 2016, 07:06
Forum: Ask for Help (v1)
Topic: How to make a key work different when it is pressed twice?
Replies: 5
Views: 2035

Re: How to make a key work different when it is pressed twice?

A popular convention of naming variables is that they should be made only of latin letters ( abcdefghijklmnopqrstuvwxyz ), arabic digits ( 0123456789 ), and underscores ( _ ) and they shouldn't start with a digit. Using other characters often cause troubles. The backtick character ( ` ) is especial...
by waetherman
28 May 2016, 03:00
Forum: Ask for Help (v1)
Topic: How to detect 'çopy' and 'paste'?
Replies: 2
Views: 962

Re: How to detect 'çopy' and 'paste'?

GEV wrote:For 'paste' you need a timer that detects changes in files (e.g. via FileRead or FileGetSize).
This will detect any change that is saved, not necessarily paste and not immediately after it happens - unless I don't know something.
by waetherman
27 May 2016, 11:18
Forum: Ask for Help (v1)
Topic: need help with keystrokes in game
Replies: 4
Views: 1905

Re: need help with keystrokes in game

I get it that it's hard to make anything fancy in AHK without a programming background, so I made you a script for one key that you can use to write similar scripts for other keys. I kind of suspected it might not work inside the game, so here's what you might try: Replace Send with SendPlay . Run t...
by waetherman
27 May 2016, 09:21
Forum: Ask for Help (v1)
Topic: Background Window Typing Topic is solved
Replies: 19
Views: 8792

Re: Background Window Typing Topic is solved

Can you give an example of a combination that doesn't work? I actually tested my script above with ALT GR combinations (in polish layout ALT GR+a = "ą" etc.)
by waetherman
27 May 2016, 09:11
Forum: Ask for Help (v1)
Topic: need help with keystrokes in game
Replies: 4
Views: 1905

Re: need help with keystrokes in game

I've prepared a script for Numpad 5, try if it works:

Code: Select all

Numpad5::
	if ( Numpad5pressed ) {
		return
	}
	Numpad5pressed := true
	Send {Up down}
	while ( GetKeyState("Numpad5","P") ) {
		Send {Right}{Right}{Left}z{Left}{Left}{Right}z{Right}{Right}{Left}z
	}
	Send {Up up}
	Numpad5pressed := false
return

Go to advanced search