Sign in to follow this  
Followers 0
dinodod

WinActive not detecting title?

3 posts in this topic

What am I missing here? The 1st time I launch the program, it's fine. The 2nd time, I was thinking it would detect the app running and prevent it frm running, yet it doesn't?

I'm thinking it's for GUIs in the main program, not a seperate one?? If so, how can I correct it? I do not want to run 2 instances of the same program.

Thanks

-Karl

$AppTitle="Shortcut"

If WinActive($AppTitle) Then
    MsgBox(0, "", "Window active")
    Exit
EndIf

...

GUICreate($AppTitle,400, 400, 193, 125)

...

Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007

Share this post


Link to post
Share on other sites



What am I missing here? The 1st time I launch the program, it's fine. The 2nd time, I was thinking it would detect the app running and prevent it frm running, yet it doesn't?

I'm thinking it's for GUIs in the main program, not a seperate one?? If so, how can I correct it? I do not want to run 2 instances of the same program.

Thanks

-Karl

$AppTitle="Shortcut"

If WinActive($AppTitle) Then
    MsgBox(0, "", "Window active")
    Exit
EndIf

...

GUICreate($AppTitle,400, 400, 193, 125)

...
Intsead of WInActive I would use WinExists, the window might not be active even though it exists. Then again I would use Singleton in misc.au3.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

http://www.autoitscript.com/forum/index.php?showtopic=58829

:) THX

Edited by dinodod

Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007

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