You could boil the question down to:
I'm not providing the full script - so have I done wrong?
That's how I read it at least.
Search found 404 matches
- 02 Mar 2017, 11:33
- Forum: Ask for Help (v1)
- Topic: Loop Error Topic is solved
- Replies: 1
- Views: 1012
- 26 Feb 2017, 17:49
- Forum: Ask for Help (v1)
- Topic: Copy and paste a specific line of text
- Replies: 3
- Views: 2675
Re: Copy and paste a specific line of text
This works for me:
Code: Select all
lineNumber := 3
textfile := "textFile.txt"
Loop, Read, %textfile%
{
;A_LoopReadLine
If (A_Index = lineNumber) {
line_contents := A_LoopReadLine
Break
}
}
FileAppend, `n%line_contents%, %textfile%
- 26 Feb 2017, 09:58
- Forum: Ask for Help (v1)
- Topic: Toggle listen to device
- Replies: 1
- Views: 1415
Re: Toggle listen to device
You need a third party app to accomplish that, maybe nircmd can do it.
- 24 Feb 2017, 12:45
- Forum: Gaming Help (v1)
- Topic: how to send only once, without using keywait
- Replies: 5
- Views: 2225
Re: how to send only once, without using keywait
Something like this maybe
Code: Select all
$F1::
SendPlay {F1}
sleep 10
Click
While GetKeyState("F1", "P")
Sleep 100
return
- 24 Feb 2017, 12:37
- Forum: Ask for Help (v1)
- Topic: Toggle Wifi Topic is solved
- Replies: 7
- Views: 2640
Re: Toggle Wifi Topic is solved
When you know the adapter name, just run netsh command. It's explained here:
https://answers.microsoft.com/en-us/win ... 39209f5081
Assume it works for W8 as well.
https://answers.microsoft.com/en-us/win ... 39209f5081
Assume it works for W8 as well.
- 24 Feb 2017, 12:33
- Forum: Ask for Help (v1)
- Topic: Script Just Stopped Working
- Replies: 2
- Views: 763
Re: Script Just Stopped Working
In what way doesn't it work - does the icon in system tray appear normally? Do you have other programs running that may try to assign hotkeys too? Does this apply to all programs you're using? This probably won't help to this particular case, but I prefer to type: F1:: send {Alt down}c{Alt up} Retur...
- 23 Feb 2017, 19:00
- Forum: Ask for Help (v1)
- Topic: Problems after updating to Win 10
- Replies: 1
- Views: 548
Re: Problems after updating to Win 10
Soo - what about you created the new script manually and forgot #Persistent ?
- 19 Feb 2017, 19:57
- Forum: Ask for Help (v1)
- Topic: Curiosities Topic is solved
- Replies: 2
- Views: 792
Re: Curiosities Topic is solved
As far I know, there is no way ahk can communicate with FN button. Maybee the FN button just bypasses the OS - but it is none but the manufactor of your computer that knows that. So it will be similar impossible question as to detect if audio plug is connected - possible only if soundcard manufactor...
- 19 Feb 2017, 09:22
- Forum: Ask for Help (v1)
- Topic: AHK for Press 'g' button for every 5 seconds
- Replies: 2
- Views: 5858
Re: AHK for Press 'g' button for every 5 seconds
Personally I would have used a timer for this - but that depends if you intend to run this pe-press routine for very long time or just a short time, which you don't tell. Then I would have made a shortcut key for stopping by giving a variable (I would have named it something like "stopKeyPress") a v...
- 19 Feb 2017, 07:34
- Forum: Ask for Help (v1)
- Topic: More built-in date functions - days between dates
- Replies: 1
- Views: 2829
More built-in date functions - days between dates
[Moderator's note: Topic moved from Wish List.] Hi. Here is one feature request from me. A built-in function to calculate the number of days between two dates, and it should be possible to use several date formats. Maybe one function named "timeBetween" where two first parameters is the date/time w...
- 19 Feb 2017, 06:58
- Forum: Ask for Help (v1)
- Topic: Detect When Cursor Over Particular Window
- Replies: 2
- Views: 1677
Re: Detect When Cursor Over Particular Window
Here is one example where a script label can run only if mouse pointer hovers over a specific application - Firefox in this case. It's an old test script i had lying around. It may not be a direct answers to your question but should raise some ideas that make you getting there ;) #If (firefoxIsActiv...
- 15 Feb 2017, 19:36
- Forum: Ask for Help (v1)
- Topic: Mod() inside If calculates different than using variable
- Replies: 13
- Views: 2407
weird it is
That is weird.
Could it be due an old version, and that it is some known bugs fixed since?
I'm currently running Version v1.1.20.03
Could it be due an old version, and that it is some known bugs fixed since?
I'm currently running Version v1.1.20.03
- 15 Feb 2017, 14:38
- Forum: Ask for Help (v1)
- Topic: Mod() inside If calculates different than using variable
- Replies: 13
- Views: 2407
Mod() inside If calculates different than using variable
Hi. Have a simple function - see code. This code works as intended formatDesimalseparator(bignumber) { StringLen, desimal_antall, bignumber i := desimal_antall ; Counts backwards sammensatt_resultat := "" Loop, %desimal_antall% { StringMid, oneSingleDesimal, bignumber, i, 1 modderen := Mod(A_index, ...
- 14 Feb 2017, 19:19
- Forum: Scripts and Functions (v1)
- Topic: My list of often use mouseclick related functions
- Replies: 12
- Views: 3174
Because there is a bug making mouse pointer very slow.
Also, why are you Sending LButton instead of just using Click/MouseClick x/y ? That is a very important question, indeed. It tunrns out that when I have more than one ahk script running simultaneously where both script have hotkeys that involves Click/MouseClick x/y , the speed of the mouse pointer...
- 13 Feb 2017, 12:44
- Forum: Scripts and Functions (v1)
- Topic: My list of often use mouseclick related functions
- Replies: 12
- Views: 3174
Re: My list of often use mouseclick related functions
Oh - the Width = Height = X = Y = is a leftover from right after I start using ahk, and I had a vague idea that I could save memory because I wasn't planning to use those variables anyway.
Should be removed.
Should be removed.
- 11 Feb 2017, 17:35
- Forum: Ask for Help (v1)
- Topic: FileCopy doesn't work ErrorLevel 1
- Replies: 4
- Views: 1006
Re: FileCopy doesn't work ErrorLevel 1
You may want to check if %appdata%\Microsoft\Windows\Start Menu\Programs\Startup\file.exe exist before you tries to copy file.
Also, this folders tends to require admin privileges to allow any change.
Also, this folders tends to require admin privileges to allow any change.
- 11 Feb 2017, 17:28
- Forum: Scripts and Functions (v1)
- Topic: My list of often use mouseclick related functions
- Replies: 12
- Views: 3174
My list of often use mouseclick related functions
Hi. Here is some useful functions that I use often. This one I wrote for dialog boxes. The purpose is to mouse click on a button that cause the window to close, normally OK or Close. It also make sure mouse pointer is placed onto the original position on screen. klikkReturnOnClose(xvar, yvar) { WinG...
- 11 Feb 2017, 16:01
- Forum: Gaming Help (v1)
- Topic: ControlSend and ControlClick Problems
- Replies: 2
- Views: 1397
Re: ControlSend and ControlClick Problems
Hi. I suggest you make a function that replaces all lines of ControlSend.
Your function should check if "Minecraft 1.8" is the active window. If not, run a holding loop until the window becomes active again.
Also the sendkeys should be a parameter to that function.
Your function should check if "Minecraft 1.8" is the active window. If not, run a holding loop until the window becomes active again.
Also the sendkeys should be a parameter to that function.
- 11 Feb 2017, 07:45
- Forum: Ask for Help (v1)
- Topic: Help with Functions Topic is solved
- Replies: 4
- Views: 1034
Re: Help with Functions Topic is solved
Some syntax corrections for your script: Your function decclearing: UseP(OL or AB) . I assume you want it to be: UseP(OL:=0, AB:=0) That means you can call the function with no parameters at all. The value 0 is default for both "OL" and "AB" unless specified. I don't like that braces to IF block is ...
- 10 Feb 2017, 10:53
- Forum: Ask for Help (v1)
- Topic: Is it possible to pause the Send command?
- Replies: 16
- Views: 3191
working example
Here is my working example - using Escape button to pause/unpause. #Persistent yourVariableName = ( This is just a very long text string that contains both newline and spaces too. Take care - don't spam too much text on your friends... ) F2:: Loop, Parse, yourVariableName { Send %A_Loopfield% Sleep ...