I think I posted about this before but can't find the post now.
When pasting this:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
NoP = %0%
If (NoP > 0) {
Loop, %NoP% {
Par := %A_Index%
String := String . Par . ", "
}
StringTrimRight, String, String, 2
FileAppend, %String%`nRun`, CmdLine.ahk`nExitApp, Tmp.ahk
Run Tmp.ahk
} Else
FileDelete, Tmp.ahk
Return
Executes one line of code from the command line.
you would execute it like this:
CmdLine.ahk msgbox "hello world"
CmdLine.ahk drive eject
CmdLine.ahk send "Cmdline.ahk send hi"
into the grid (without editing a cell), IQ doesn't ask whether I want to paste into a single cell / item (which it does in other cases with multiline text - based on what criteria?). It then pastes the text in several items (some with children) in reverse order.
If I first enter edit mode in a blank item, IQ pastes one 'good' item that contains the text in a single cell (what I wanted to achieve) but additionally it does the 'multi-item in reverse order' paste described above for when not in edit mode.
It would be great to have a reliable way to tell IQ to paste into a single item plus the unwanted extra items for the second approach (paste while editing) should be eliminated.
Thanks
Comments