Sign in to follow this  
Followers 0
Dellairion

On Windows Movement

4 posts in this topic

Hello,

I'm trying to update my tcp/udp packet forwarder (this time with a user friendly gui).

Is it possible to force the script to keep running while the window is getting moved?

I don't want the whole process to pause while the user is just moving the gui.

I thought that i have seen a solution somewhere on this forum to this,

i'm just unable to find it...

Thnx,

Dellairion

Share this post


Link to post
Share on other sites



Hello,

I'm trying to update my tcp/udp packet forwarder (this time with a user friendly gui).

Is it possible to force the script to keep running while the window is getting moved?

I don't want the whole process to pause while the user is just moving the gui.

I thought that i have seen a solution somewhere on this forum to this,

i'm just unable to find it...

Thnx,

Dellairion

The script doesn't stop, only updating of the GUI. Use this demo:
#include <GuiConstantsEx.au3>
#include <StaticConstants.au3>

Global $n = 0
Global $hGUI = GUICreate("Test", 300, 200)
Global $Label = GUICtrlCreateLabel("$n = 0", 20, 20, 260, 20, $SS_CENTER)
GUISetState()
Do
    $n += 1
    GUICtrlSetData($Label, "$n = " & $n)
Until GUIGetMsg() = $GUI_EVENT_CLOSE

While you move the GUI, the display stops updating, but when you release the mouse the number jumps showing the $n was still being incremented while the graphical display was frozen.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi,

Perhaps if you check position of your gui until it's not active ...

$lastmove="1|1"
While 1;Create while in your function or global while
Sleep(100);pause little time
$move = WinGetPos($GUI,"");not sure of parameters

If Not $move[0]&"|"&$move[1] = $lastmove then
$lastmove=$move[0]&"|"&$move[1]
Else
Sleep(3000);Time between check
Endif
Wend
Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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  
Followers 0