Leagnus Posted January 14, 2008 Posted January 14, 2008 (edited) CODE#include <misc.au3> Opt('TrayIconDebug', 1) Opt("WinTitleMatchMode", 4) local $tcPath, $tabPath, $fnd, $CurTab $tcPath = envGet("COMMANDER_INI") $fnd = StringRegExp($tcPath,'[^\\]+.ini',1) $tabPath=StringTrimRight($tcPath, StringLen($fnd[0])) & "Tabs" $CurTabSet=iniRead($tcPath,"Tabs","Current","") $hwnd = WinGetHandle('classname=TTOTAL_CMD') _SendMessage($hWnd, 1075, 3009) After the last string au3-script stops and waits until a user responds to appeared menue – any code after the string DOES NOT run Is there a way to override this? in PowerPro language I do the same w/o the trouble: CODElocal hh=win.handle("c=TTOTAL_CMD") win.postmessage(hh,0x400+51,3009,0) *keys {down 6}{enter}1^{enter} Edited January 14, 2008 by Leony
ZoSTeR Posted January 14, 2008 Posted January 14, 2008 (edited) DllCall always seems to wait for a return value. Not directly related to your question but if you're trying to save the current TC tabs it might be better to use "Save Settings" (command 580) and then parse the wincmd.ini. And by the way, why not $tcPath = envGet("COMMANDER_PATH") Edited January 14, 2008 by ZoSTeR
Leagnus Posted January 14, 2008 Author Posted January 14, 2008 DllCall always seems to wait for a return value.May be there is a way not to wait or simulate fake respond?
Lazycat Posted January 14, 2008 Posted January 14, 2008 Maybe because you use SendMessage, that wait until command will be done, when win.postmessage looks like use PostMessage command, that post message in queue and exit. Try use PostMessage instead SendMessage. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s])
Leagnus Posted January 14, 2008 Author Posted January 14, 2008 (edited) Wow! DllCall("user32.dll", "int", "PostMessage", _ "hwnd", $hwnd, _ "int", 1075, _ "int", 3009, _ "int",0) Thanks, guys! Especially Lazycat! Edited January 14, 2008 by Leony
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