Submitted by LeftEccoForIQ on 2020/10/15 02:58
While trying to paste the AHK code quoted at the end of this post (used to execute scripts on special button combinations on my mouse - aren't gaming mice great productivity enhancers?) into a single grid item, I ran into some problems:
 
1. The dialog offering to paste as a single item does not open, instead the code is pasted as several items with different amounts of lines included in each item, i.e. IQ does not put each line into a separate item but groups them together by its own logic.
2. The items created are in reverse order, i.e. the top of the code / text ends up being the bottommost item rather than the topmost one.
3. I then selected all the items that were created and ran the 'delete items' command. Deleting multiple items at once seems to be a very slow and hard job for IQ even though it's not much more than a page of text in total (though that's probably an irrelevant factor). Maybe it would help performance if the grid weren't graphically refreshed after the deletion of each individual item (which seems to be what is going on)? Instead maybe wait for all items to be deleted internally, then refresh the grid just once?
 
BTW, I've run into these problems a couple of times before, but never got round to posting the issue - so it's not specific to the text snippet below.
 
Thanks!
 
 
$+#a:: ;+ ;; Roccat wheel left
    Gosub, MWLTDown
    Keywait, a
return
$+#a Up::
    Gosub, MWLTUp
return ;-
$+#w:: ;+ ;; Roccat button just under wheel - to replace FarThumb?
    ;; osd("Roccat: button under wheel pressed.")
    ;; GoSub, FarThumbDown
    
    FTDownT := A_TickCount
    MouseGetPos, FTDownX, FTDownY
    WinGet, ActHandle, ID, A
    if (ActHandle = "")
        ActHandle := 0

return
$+#w up::
    ;; GoSub, FarThumbUp
    
    if (FTDownT == "")
        return
    FTDownT := A_TickCount - FTDownT
    if (FTDownT < 200)
    {
        ;; Send {LAlt Down}{tab}
        ;; Sleep 20
        ;; Send {LAlt Up}
       
        Win_AltTab()
    }
    else
        if (FTDownT != "")
            PP_Cmd(".M_FarThumb(" . FTDownX . ", " . FTDownY . ", " . FTDownT . ", " . ActHandle . ")")
        else
        {
            osd("Mouse script call with blank parameters (" . A_Thishotkey . ").", "center red")
            ;; PP_Cmd("KeyTrap.ResetKeys()")
        }
    
return ;-
$+#d:: ;+ ;; Roccat wheel right
    Gosub, MWRTDown
    Keywait, d
return
$+#d Up:: ;; Roccat wheel right
    ;; Send {F16 up}
    Gosub, MWRTUp
return ;-
$+^!F1:: ;+ ;; Roccat EasyShift + lc
    osd(";; Roccat EasyShift + lc")
return
$+^!F1 up:: return ;-
$+^!F2:: ;+ ;; Roccat EasyShift + rc
    osd(";; Roccat EasyShift + rc")
return
$+^!F2 up:: return ;-
$+^!F3:: ;+ ;; Roccat EasyShift + mc
    osd(";; Roccat EasyShift + mc")
return
$+^!F3 up:: return ;-
$+^!F4:: ;+ ;; Roccat EasyShift + MWLT
    osd(";; Roccat EasyShift + MWLT")
return
$+^!F4 up:: return ;-
$+^!F5:: ;+ ;; Roccat EasyShift + MWRT
    osd(";; Roccat EasyShift + MWRT")
return
$+^!F5 up:: return ;-
$+^!F6:: ;+ ;; Roccat EasyShift + wheel up
    ;; osd(";; Roccat EasyShift + wheel up")
    Send {WheelUp 8}
    KeyWait, F6
return ;-
$+^!F7:: ;+ ;; Roccat EasyShift + wheel down
    ;; osd(";; Roccat EasyShift + wheel down")
    Send {WheelDown 8}
    KeyWait, F7
return ;-