Search found 1308 matches

by Capn Odin
01 Dec 2017, 14:18
Forum: Offtopic
Topic: AHKathon! [AHK Hackathon] 12/17
Replies: 80
Views: 21754

Re: AHKathon! [AHK Hackathon] 12/17

You will never again need to click manually, with this one simple entry.

Code: Select all

loop {
	Click
}
by Capn Odin
30 Nov 2017, 11:27
Forum: Gaming
Topic: need to help Topic is solved
Replies: 1
Views: 383

Re: need to help Topic is solved

Code: Select all

F1::Send, {F5 down}{F6 down}
F2::Send, {F5 up}{F6 up}

a::
	Send, {F7}
	Sleep, 100
	Send, {F8}
return

d::
	Send, {F5 up}
	Sleep, 100
	Send, x
	Sleep, 100
	Send, {F5 down}
return

s::
	Send, {F6 up}
	Sleep, 100
	Send, x
	Sleep, 100
	Send, {F6 down}
return
by Capn Odin
26 Nov 2017, 10:29
Forum: Ask For Help
Topic: WinSet Region question
Replies: 13
Views: 1914

Re: WinSet Region question

An alternative approach using TransColor. OnMessage("0x200", "WM_MOUSEMOVE") Gui, New, +HwndGuiHwnd +LastFound -Caption +ToolWindow, Cheese Gui, Color, 0xf9d983 Gui, Add, Picture, , Cheese.png Gui, Show, AutoSize WinSet, TransColor, f9d983, % "ahk_id " GuiHwnd Return WM_MOUSEMOVE(wparam, lparam, msg...
by Capn Odin
26 Nov 2017, 04:24
Forum: Ask For Help
Topic: Need Help with Saving a file
Replies: 3
Views: 1311

Re: Need Help with Saving a file

You need to split the line in to parts.

Edit: or if you only change a few things, make the file manually load it with FileOpen replace the parts that you need and save it again. Or you can use COM to parse your html file and modify it through the interface.
by Capn Odin
24 Nov 2017, 11:12
Forum: Ask For Help
Topic: How to use Generic Timed File Backup Script for several locations Topic is solved
Replies: 3
Views: 866

Re: How to use Generic Timed File Backup Script for several locations Topic is solved

I don't understand what you mean by copy paste, but you can have several lines in a string like this.

Code: Select all

BackupInfo =
(
C:\Program Files\AutoHotkey\*.txt|c:\MyBackup\AutoHotkey text files|1|0
%A_MyDocuments%\desktop.ini|c:\MyBackup\destop.ini backup files|0|0|backup|A_Now
)

MsgBox, % BackupInfo
by Capn Odin
24 Nov 2017, 07:01
Forum: About This Community
Topic: Rule Poll
Replies: 59
Views: 57192

Re: Rule Poll

maybe you don't believe me either I know your kind, you are planning to have it run at start up on the computer of all elderly cat ladies, this will make them unable to function in society and evolution will take its course, resulting in a reduction of the demand for cat food and since the supplier...
by Capn Odin
23 Nov 2017, 11:55
Forum: Gaming
Topic: Can someone write?
Replies: 3
Views: 642

Re: Can someone write?

Code: Select all

SetKeyDelay, 0, 50
F1::Send, {F4}{F2}{F3}{F2}
by Capn Odin
23 Nov 2017, 10:06
Forum: Ask For Help
Topic: Press button more than once Topic is solved
Replies: 2
Views: 543

Re: Press button more than once Topic is solved

Usually you would use GuiControl to manipulate native ahk guis, this will work with vVariables. ControlSend is meant for generic use and does there for not support vVariables to identify controls, you can use the ClassNN or HWND of the control. Gui, +AlwaysOnTop Gui, Font, s20 Gui, Add, Edit, vTitle...
by Capn Odin
21 Nov 2017, 10:42
Forum: Ask For Help
Topic: object removeAt Topic is solved
Replies: 4
Views: 847

Re: object removeAt Topic is solved

It is fine to overwrite a variable with the result of a function on the same variable.
by Capn Odin
21 Nov 2017, 10:28
Forum: Ask For Help
Topic: object removeAt Topic is solved
Replies: 4
Views: 847

Re: object removeAt Topic is solved

RemoveAt shifts the indexes which makes your loop miss certain indexes. lst := StrSplit("abcdefghijklm") bool := True loop % lst.Length() { MsgBox, % lst[A_Index] if(bool := !bool) { lst.removeat(A_Index) } } Notice how at the end the message box is blank because it skipped some elements. To solve t...
by Capn Odin
21 Nov 2017, 08:22
Forum: Ask For Help
Topic: Webscraping - can I do this...
Replies: 3
Views: 667

Re: Webscraping - can I do this...

Both AutoHotkey and Python are more then capable of doing what you want. Here is a way to get all links in both languages. AutoHotkey: pwb := ComObjCreate("InternetExplorer.Application") ; Create an IE object ;pwb.Visible := True ; Make the IE object visible pwb.Navigate("https://autohotkey.com/boar...
by Capn Odin
20 Nov 2017, 21:06
Forum: Ask For Help
Topic: autohotkey multi-threading
Replies: 3
Views: 3495

Re: autohotkey multi-threading

In AutoHotkey_L the closest thing to multi-threading is to run multiple scripts at the same time. However it possible to achieve a similar effect using SetTimer , this will alternate between executing the difference threads instead of executing them at the same time. AutoHotkey_H has native support ...
by Capn Odin
19 Nov 2017, 21:20
Forum: Other Programming Languages
Topic: Python code challenge
Replies: 2
Views: 2874

Re: Python code challenge

I'm pretty tired so the code is likely bad, at the very least it is inefficient. import time ut = time.time() days = ut // (60 * 60 * 24) secToDay = ut % (60 * 60 * 24) hour = secToDay // (60 * 60) min = secToDay // 60 - hour * 60 sec = secToDay - hour * 60 * 60 - min * 60 print(f"Days: {int(days)}\...
by Capn Odin
19 Nov 2017, 19:34
Forum: Ask For Help
Topic: How to turn on off toggle?
Replies: 3
Views: 738

Re: How to turn on off toggle?

That sound like a normal hotkey.

Code: Select all

F1::
	; Commands and functions
Return
F2::Reload
by Capn Odin
19 Nov 2017, 19:08
Forum: Ask For Help
Topic: How to turn on off toggle?
Replies: 3
Views: 738

Re: How to turn on off toggle?

If you mean hotkeys then you can use a boolean in an #If to turn on/off the hotkeys.

Code: Select all

bool := False
#If bool
	x::Send, AHK
	F2::Reload
#If
F1::bool := !bool
by Capn Odin
19 Nov 2017, 18:44
Forum: Ask For Help
Topic: Scintilla controls: set text works only if #NoEnv is on Topic is solved
Replies: 5
Views: 981

Re: Scintilla controls: set text works only if #NoEnv is on Topic is solved

Try checking if any of part of your script shares a name with an Environment Variable.
by Capn Odin
18 Nov 2017, 19:06
Forum: Ask For Help
Topic: Location of table describing multiple equal-sign operators
Replies: 4
Views: 843

Re: Location of table describing multiple equal-sign operators

-= subtract something from a variable.

Code: Select all

var := 10
var -= 5
MsgBox, % var
Is the table not the one on the page in the docs ?
by Capn Odin
17 Nov 2017, 19:31
Forum: Ask For Help
Topic: Sound detection Topic is solved
Replies: 11
Views: 2268

Re: Sound detection Topic is solved

It is possible but I only know how to get the volume. #SingleInstance force DetectHiddenWindows On BackgroundColor := "C6D43C" Gui, 1:New, +AlwaysOnTop +ToolWindow -Caption +LastFound +0x800000 +E0x00000020, Volumn Gui, Margin, 0, 0 Gui, Color, %BackgroundColor% ;Gui, Add, Progress, w20 h300 cBlue B...
by Capn Odin
17 Nov 2017, 19:16
Forum: Ask For Help
Topic: How to genuinely compile a script? Is there any "loop" faster alternative?
Replies: 12
Views: 2732

Re: How to genuinely compile a script? Is there any "loop" faster alternative?

You definitely can compile AHK since the script is being turned into instructions that are run on the cpu, if you store the instructions you would have a compiled AHK script. However this will only work for a script that terminates. But I would suggest using another language for applications where t...
by Capn Odin
17 Nov 2017, 15:58
Forum: Ask For Help
Topic: Use Alt as a trigger key Topic is solved
Replies: 1
Views: 532

Re: Use Alt as a trigger key Topic is solved

Change c:: to LAlt::

Edit: and GetKeyState("c", "P") to GetKeyState("LAlt", "P")

Go to advanced search