Code: Select all
PureBasic 6.10 LTS (Windows - x64)
I would like the ability to right-click on a procedure,
have the procedure highlighted,
and then copy the highlighted procedure to the clipboard.
At the present time,
I have an AutoHotKey Script that does most of this.
Code: Select all
; AutoHotKey script to automate the task in PureBasic IDE
#q::ExitApp ; Assign a hotkey to terminate this script
; Hotkey to activate the script (Ctrl+J)
^j::
; Start the selection from the current line to the next EndProcedure statement
Send, +{Down}
; Continue holding Shift and pressing Down until reaching the EndProcedure statement
Loop
{
; Send the Down key to move to the next line
Send, +{Down}
Sleep, 5 ; Adjust the delay as needed
; Check if the current line contains "EndProcedure"
Clipboard := "" ; Clear the clipboard
Send, ^c ; Copy the current line to the clipboard
Sleep, 25 ; Wait for the clipboard to update
ClipWait, 1 ; Wait up to 1 second for the clipboard to contain data
if InStr(Clipboard, "EndProcedure")
break ; Exit the loop if "EndProcedure" is found
}
; Copy the selected text to the clipboard
Send, ^c
Send, {Down}
Return
except I have to press Ctrl+J once I have selected the procedure from the Procedure Browser.
Not a big deal to press the Ctrl+J hotkey.
Would it be possible to make this a feature in the PureBasic IDE,
without having to use AutoHotKey?
Joe