Up arrow bracket for devs

Post your working scripts, libraries and tools
MasterGamer9910
Posts: 1
Joined: 26 Mar 2019, 01:00
GitHub: jacobboogiebear

Up arrow bracket for devs

26 Mar 2019, 01:10

I made a script for using the ^ thing easily so that you don't have to copy & paste it anymore!

Code: Select all

B := false
X := false
L := false
O := false
MsgBox, 0x24, Autohotkey - Up, Starting up.exe for Autohotkey development`n(Did you start this script?),
IfMsgBox, Yes 
    {
        MsgBox, 0x24, Autohotkey - Up, Would you like the app to block up arrow when command is used?,
        IfMsgBox, Yes
            {
                B := true
                Help()
                Return
            } else {
                B := false
                Help()
                Return
            }     
        Return
    } else {
        MsgBox, 0x40, Autohotkey - Up, Sorry then, we are turning off!, 
        ExitApp
        Return
    }
Help() {
    MsgBox, 0x24, Autohotkey - Up, Do you know how to use this tool?, 
    IfMsgBox, No
        {
            Info()
            Return
        }
}
ButtonClick: 
    Gui, Destroy
    return
Info() {
    Gui, Show, w300 h75, Autohotkey - UP - Help
    Gui, Add, Text, x10 y5, To exit press "Control + Shift + F11"
    Gui, Add, Text, x10 y20, To print up arrow bracket do "Control + UpArrow"
    Gui, Add, Text, x10 y35, To re-open this menu do "Control + Shift + UpArrow"
    Gui, Add, Button, Default w80 x100 y50 gButtonClick, Done
}
^Up::
    L := true
    O := true
    if (!B) {
        if (!X) {
            Send, {Raw}^
        }
    } else {
        Send, {Raw}^
    }
    if (!B) {
        X := true
        Send, {Up}
    }
    return
^Up Up::
    X := false
    return
^ Up::
    L := false
    return
Up::
    if (!L && !O) {
        Send, {Up}
    }
    return
Up Up::
    L := false
    O := false
    return
^+Up::
    Info()
    return
^+F11::
    MsgBox, 0x24, Autohotkey - UP, Do you want to close the script?
    IfMsgBox Yes
		{
			ExitApp
			return
		} else {
			MsgBox, 0x30, Autohotkey - UP, Continuing script
			return
		}
    return
Here is the Autohotkey file!
Attachments
up.ahk
File
(1.84 KiB) Downloaded 16 times
User avatar
Delta Pythagorean
Posts: 464
Joined: 13 Feb 2017, 13:44
GitHub: DelPyth
Location: Somewhere in the US

Re: Up arrow bracket for devs

27 Mar 2019, 02:01

Shift and 6 pastes the carret character. There's no need for this.
gregster
Posts: 2515
Joined: 30 Sep 2013, 06:48

Re: Up arrow bracket for devs

27 Mar 2019, 03:06

Delta Pythagorean wrote:
27 Mar 2019, 02:01
Shift and 6 pastes the carret character.
Well, that depends on the keyboard layout. On my keyboard the caret is an own key below the Esc key - I wonder, if there are layouts that don't have this character...
electrified
Posts: 24
Joined: 18 Jan 2019, 11:06

Re: Up arrow bracket for devs

27 Mar 2019, 05:08

It does indeed depend on the layout.

Still it seems like a lot of code for something which can be done like this, for instance:

+Up::
Send {Asc 94}
Return

Return to “Scripts and Functions”

Who is online

Users browsing this forum: robodesign, skoliver1 and 41 guests