Did some searches but couldnt come up with anything on this.
I have dialog boxes that get prepopulated with some info. For example, I have 2 keyboard shortcuts to dialog boxes that ask for a PC name
The resulting scripts either remote control them, or map to them with \\xxx%variable%
The xxx is not the same 100% of the time, so i want to leave it there. Is there a way I can make the cursor in the dialog box have the cursor at the end, rather than having to manually press end?
By default, the pre-populated text is selected.
Msched Dialog box cursor position - default to end?
Moderators: Dorian (MJT support), JRL
You could use a non-modal Dialog then set focus to the edit field and press end via the script immediately after the dialog opens.
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Caption = 'Test'
ClientHeight = 100
ClientWidth = 400
Position = poScreenCenter
object Edit1: TEdit
Left = 44
Top = 46
Width = 317
Height = 21
TabOrder = 8
Text = '\\ServerSeven\'
end
end
EndDialog>Dialog1
AddDialogHandler>Dialog1,,OnClose,Quit
Show>Dialog1
SetDialogObjectFocus>Dialog1,Edit1
Press End
Label>IdleLoop
Wait>0.01
Goto>IdleLoop
SRT>Quit
Exit
END>Quit