Earthshine Posted May 22, 2018 Share Posted May 22, 2018 (edited) No, hang on when I get back to my desk I’ll look at this I think I know what’s going on You don’t want to send a plain F, The F has an underscore so that’s either an alt or control before the F Edited May 22, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Dream4soul Posted May 22, 2018 Author Share Posted May 22, 2018 I use AD login and I am domain Admin. Also I try run as Administrator, the same results Link to comment Share on other sites More sharing options...
Earthshine Posted May 22, 2018 Share Posted May 22, 2018 (edited) You know that terminal emulator has commandline capabilities I believe and you may be able to find what you need to do on the commandline and just do that in Autoit Also you never really captured the menu information which was all left blank what you posted Edited May 22, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Dream4soul Posted May 23, 2018 Author Share Posted May 23, 2018 Local $hWnd = WinGetHandle("9U-34801 - Liaison UTS Terminal Emulator") ;Local $hWnd = WinGetHandle("Untitled - Notepad") If @error Then MsgBox($MB_SYSTEMMODAL, "", "An error occurred when trying to retrieve the window handle of Notepad.") Exit EndIf ; Display the handle of the Notepad window. ; MsgBox($MB_SYSTEMMODAL, "", $hWnd) WinActivate($hWnd) SendKeepActive($hWnd) WinWaitActive($hWnd) Sleep(500) Opt("WinTitleMatchMode", 4) $hMain = _GUICtrlMenu_GetMenu($hWnd) $t1 = _GUICtrlMenu_GetItemText($hMain, 0) $hsub = _GUICtrlMenu_GetItemSubMenu($hMain, 0) $t2 = _GUICtrlMenu_GetItemText($hsub, 6) ;if WinMenuSelectItem($hWnd, "", "&File", "Pla&yback Script...") then if WinMenuSelectItem($hWnd, "", $t1, $t2) then MsgBox($MB_SYSTEMMODAL, "", "WinMenuSelectItem: Successfull ") Else MsgBox($MB_SYSTEMMODAL, "","WinMenuSelectItem: failed" ) EndIf ;WinMenuSelectItem($hMain, "", "&File", "Pla&yback Script...") MsgBox($MB_SYSTEMMODAL, "", $t1) MsgBox($MB_SYSTEMMODAL, "", $t2) I try to use menu. Both $t1 and $t2 return correct item. WinMenuSelectItem return successful. And again nothing happen in my application :(((( Link to comment Share on other sites More sharing options...
Dream4soul Posted May 23, 2018 Author Share Posted May 23, 2018 Problem solve, I use AU3Record. :))))) Link to comment Share on other sites More sharing options...
Earthshine Posted May 23, 2018 Share Posted May 23, 2018 So, could you show your solution so others that read this thread can see? Also, you must be using an older version of AutoIT, I thought the record was not supported anymore. Anyway, please post the code that works for the benefit of others. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Dream4soul Posted May 23, 2018 Author Share Posted May 23, 2018 Func _Au3RecordSetup() Opt('WinWaitDelay',100) Opt('WinDetectHiddenText',1) Opt('MouseCoordMode',0) Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '') If $aResult[1] <> '00000409' Then MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $aResult[1] & ')') EndIf EndFunc Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc _AU3RecordSetup() Local $hWnd = WinGetHandle("9U-34801 - Liaison UTS Terminal Emulator") WinActivate($hWnd) SendKeepActive($hWnd) WinWaitActive($hWnd) Sleep(500) _WinWaitActivate("9U-34801 - Liaison UTS Terminal Emulator","") MouseClick("left",75,3,1) MouseClick("left",14,30,1) MouseClick("left",80,145,1) _WinWaitActivate("Select a script to playback","Namespace Tree Contr") ControlSetText("Select a script to playback", "Namespace Tree Contr", "Edit1", "1_in.txt") MouseClick("left",539,449,1) I copy an old version of autoit and use AU3Record. I don’t know why, but this works. Earthshine thank for your support. You help me in my discovery. Link to comment Share on other sites More sharing options...
Earthshine Posted May 23, 2018 Share Posted May 23, 2018 still, we should have been able to do this mate. The AutoIT info Tool is a good tool. I noticed your attached menu text file and all the data was blank but that version can see the Namespace Tree Contr, strange. Cool, thanks for posting the solution. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now