Page 1 of 1

Up arrow bracket for devs

Posted: 26 Mar 2019, 01:10
by MasterGamer9910
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!

Re: Up arrow bracket for devs

Posted: 27 Mar 2019, 02:01
by Delta Pythagorean
Shift and 6 pastes the carret character. There's no need for this.

Re: Up arrow bracket for devs

Posted: 27 Mar 2019, 03:06
by gregster
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...

Re: Up arrow bracket for devs

Posted: 27 Mar 2019, 05:08
by electrified
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