Jump to content
Sign in to follow this  
Leagnus

TC context Menu stops runing au3

Recommended Posts

Leagnus

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:

CODE
local hh=win.handle("c=TTOTAL_CMD")

win.postmessage(hh,0x400+51,3009,0)

*keys {down 6}{enter}1^{enter}

Edited by Leony

Share this post


Link to post
Share on other sites
ZoSTeR

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 by ZoSTeR

Share this post


Link to post
Share on other sites
Leagnus

DllCall always seems to wait for a return value.

May be there is a way not to wait or simulate fake respond?

Share this post


Link to post
Share on other sites
Leagnus

Wow!

DllCall("user32.dll", "int", "PostMessage", _

"hwnd", $hwnd, _

"int", 1075, _

"int", 3009, _

"int",0)

Thanks, guys! Especially Lazycat!  :D

Edited by Leony

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.