Double hotkey help!

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
HotkeyNoob
Posts: 1
Joined: 11 Mar 2018, 11:11

Double hotkey help!

11 Mar 2018, 12:45

Code: Select all

; =======================================================================================
; Name ..........: Script Name
; Description ...: Script Description
; AHK Version ...: AHK_L 1.1.22.06 (Unicode 32-bit) - September 13, 2015
; Platform ......: Windows 2000+
; Language ......: English (en-US)
; Author ........: FirstName LastName <[email protected]>
; =======================================================================================

; Changelog =============================================================================
; Legend: (+) NEW, (*) CHANGED, (!) FIXED
; ---------------------------------------------------------------------------------------
; YYYY-MM-DD  FirstName LastName  <[email protected]>
; + Change Description
; ---------------------------------------------------------------------------------------
; YYYY-MM-DD  FirstName LastName  <[email protected]>
; + Change Description
; =======================================================================================

; Global ================================================================================
#SingleInstance, Force ; Allow only one running instance of script
#Persistent ; Keep script permanently running until terminated
#NoEnv ; Avoid checking empty variables to see if they are environment variables
#Warn ; Enable warnings to assist with detecting common errors
;#NoTrayIcon ; Disable the tray icon of the script
SendMode, Input ; Recommended for new scripts due to its superior speed and reliability
SetWorkingDir, %A_ScriptDir% ; Change the working directory of the script
SetBatchLines, -1 ; Run script at maximum speed
OnExit, ExitSub ; Run a subroutine or function automatically when the script exits
; =======================================================================================

; Script ================================================================================

Return ; End automatic execution
; =======================================================================================

; Labels ================================================================================
MenuHandler:
	MsgBox, You selected %A_ThisMenuItem% from menu %A_ThisMenu%.
Return

GuiEscape:
GuiClose:
ExitSub:
	ExitApp ; Terminate the script unconditionally
Return
; =======================================================================================

; Functions =============================================================================
GUIMain()
{
	Static GUICreate := GUIMain()
	
	Global
	
	GUIWidth := 600, GUIHeight := 400
	
	Menu, Tray, Icon, Shell32.dll, 174 ; Change the tray icon
	Menu, Tray, Tip, Script Name ; Change the tooltip of the tray icon
	Menu, Tray, NoStandard ; Remove all standard tray menu items
	Menu, Tray, Add, Exit, ExitSub

	Gui, +LastFound -Resize
	;Gui, Color, FFFFFF
	Gui, Margin, 10, 10

	Gui, Add, CheckBox, gGoHereWhenClicked, quick tp
torp = 0

	Gui, Add, Text,, Touchsphere backpack #

	Gui, Add, ListBox ,gLbox vIndex +AltSubmit h100, 1|2|3|4|5|6|7|8|9|10

	Gui, Add, CheckBox, % " x" 150 " y" 10 " w" 73 " h" 26, quick Drop [q]

	Gui, Show, % " w" GUIWidth " h" GUIHeight, auto menu sfothiv

	Return
}

GoHereWhenClicked:
If torp = 0 
{
checkycrazy = 1
isticked = true
torp += 1 ; 
}
else
{
isticked = false
torp = 0
}

Lbox:

If (A_GuiEvent = "DoubleClick")
{
Gui,Submit,Nohide

If !isticked 
MsgBox You haven't ticked quicktp yet
else
If isticked = true
#if (index =1) 
{
~E::return
Send {1}
Click
}
#if index =2
{
~E::return
Send {2}
Click
}

#if index =3
{
~E::return
Send {3}
Click

}
#if index =4
 {
~E::return
Send {4}
Click
}
#if index =5
{
~E::return
Send {5}
Click
}
#if index =6
 {
~E::return
Send {6}
Click

}
#if index =7
{
~E::return
Send {7}
Click

}
#if index =8
{
~E::return
Send {8}
Click

}
#if index =9
{
~E::return
Send {9}
Click

}
#if index =10
{
~E::return
Send {0}
Click
}
}
return

; =======================================================================================
I'm trying to make it where you double click a number in the listbox, then press E it presses the number in the listbox you pressed on your keyboard and then clicks. so far when i press e after clicking a number in the listbox nothing happens

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, Rohwedder and 59 guests