Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need some help with Dialog
#1
I would like some help with the following Dialog. The TRANSFER button is supposed to copy all text from the edit box, performing an ALT+TAB to switch to the underlying application and then paste the text into that application. After that the dialog has to close. 
I tried to put focus to the edit section, but that didn't work. The only part that does work is the ALT+TAB command:

Function SIMPLE TEXT-BOX 
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Edit 0x54231044 0x200 16 8 188 96 ""
;4 Button 0x54032000 0x0 108 116 48 14 "TRANSFER"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

str controls = "3"
str e3
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,ret
,case IDCANCEL

,case 4 ;;TRANSFER
;Now the edit box needs to get focus.

,key Ca          ;; Ctrl+A (selecting all text in the edit box)
,key Cc          ;; Ctrl+C (copy)
,key AT          ;; Alt+Tab (switch to the active application, so far this is the only thing that works).
,1
,key Cv          ;; Ctrl+V (pasting the text)
,
;After performing the above actions the Dialog has to close.

ret 1


Messages In This Thread
Need some help with Dialog - by InterestedNewbie - 05-02-2018, 03:05 AM
RE: Need some help with Dialog - by Kevin - 05-02-2018, 04:04 AM
RE: Need some help with Dialog - by Gintaras - 05-02-2018, 06:27 AM
RE: Need some help with Dialog - by Kevin - 05-02-2018, 06:04 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)