Jump to content
Sign in to follow this  
qsek

RightclickMenu without pausing the scipt

Recommended Posts

qsek

Basically i have a script with OnEventMode 1 which performes several actions per second, including TCP Sends receives etc.

and i have a GUI where i want to have special Rightclickmenus, but i dont want the script to pause and miss essential data, while the user chooses what menu item he want to click.

once i saw a post with a workaround.

I used different searchpattern but cant find it anymore.

I think DllCallback or Adlib was used but im not sure.

Anyone have ideas or knows the topic im searching?


Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite

Share this post


Link to post
Share on other sites
qsek

#include <GuiDragable.au3>
#include <Guiconstants.au3>

Dim $LeftPos

$GuihWnd = _GuiDragableCreate("Drag GUI Demo", 300, 150, -1, -1)
GUISetBkColor(0xffffff)

$ExampleLabel = GUICtrlCreateLabel("Drag Me (but not by controls) wink.gif", 0, 60, 250, 20)
GUICtrlSetFont(-1, 12, 600, 0, "Tahoma")
GUICtrlSetColor(-1, 0xDD0000)

AdlibEnable("Example", 50)

DllCall("User32.dll", "long", "AnimateWindow", "hwnd", $GuihWnd, "long", 300, "long", 0x10)
GUISetState()

While 1
    Sleep(10)
WEnd

Func Example()
    $LeftPos += 3
    GUICtrlSetPos($ExampleLabel, $LeftPos, 60)
    If $LeftPos >= 300 Then $LeftPos = -250
EndFunc

hmm although this is a similar issue, it dont helps with my problem.

Actually the script in this example is paused too while being dragged, you only get the idea of a continued script because the Label is moving, but which is done by Adlib.

I have the problem that the main script must continue while showing the Rightclickmenu.

Edited by qsek

Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite

Share this post


Link to post
Share on other sites
jpm

Not sure there is a solution. AutoIt has no multithreading and I think that when Windows is handling the rightclicking the Autoit Thread is waiting the end of the right clicking so adlib cannot even be handle.

Can you post a small repro script so I can test it?

Share this post


Link to post
Share on other sites
jpm

as I understand the exaple use the Standard UDF not the AutoIt basic functions so may be the way to use them can have a problem.

can I have an example with basic functions GUICtrlCreateMenu... ?

Share this post


Link to post
Share on other sites
qsek

thx rasim, didnt saw it at first that your using a timer dllcall.

but still i dont preferr this solution cause you have a function you call every second.

I would have problems to get big parts of my script into one function to make it callable.

Most of the core Actions are global not in functions.

But i can imagine that it is easier with making a child GUI and imitate a rightclickmenu with highlighting and so on.

No one ever did that?

Edited by qsek

Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite

Share this post


Link to post
Share on other sites
qsek

YES, i found exactly that what i searched for 2 hours now in the forum: :)

#389658

Edited by qsek

Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite

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  

×