Jump to content

Recommended Posts

Posted

Hello forum world,

I am having an issue with a popup window displaying after selecting something using the ControlCommand( ) function.

I am able to select the desired item from the dropdown list using the control command function but a popup window opens immediately after, not allowing the control command function to finish.

Such as:

ConsoleWrite("Before ControlCommand" & @CRLF)

ControlCommand($Win_Name, "", $ID, "SelectString", $DropItemName)

ConsoleWrite("After ControlCommand" & @CRLF)

 

^^^^

So in the console I can get the "Before...", then the ControlCommand executes the selection of the dropdown menu.  Popup window opens

But since there is a popup, I can not get the "After..." statement to write to the console. 

This is where I am stuck, as I can not execute another command to close the popup window.

 

Send help, oh gracious autoit forum. :) 

Posted (edited)
17 minutes ago, JohnOne said:

Write a script to wait for and close the popup, and end. (separate script)

Run the script just before your ControlCommand.

@JohnOne How would I run that script and the controlcommand at the same time?

The other script would go something like this?

Popup_Check( )

While 1

IF WinState($PopupWinName) <> 0 Then

WinExit($PopWinName)

Endif

WEnd

 

ControlCommand( Select from drop down)

Edited by help_me_please
Posted
17 minutes ago, JohnOne said:

Separate popup.au3

ShellExecute("popup.au3")

@JohnOne I tried the suggestion and it does appear to be working.

Startup_Popup_Window_Killer.au3

;Popup Window Closing Function
Local $timer_start = TimerInit()
Local $timer_delta = TimerDiff($timer_start)

While $timer_delta < 3000

   ;Close popup window if it exists
   If WinGetState($PopupWinName) <> 0 Then
      WinClose($PopupWinName)
   EndIf

   $timer_delta = TimerDiff($timer_start)
   ConsoleWrite(round($timer_delta/1000,4) & @CRLF)
WEnd

 

Script to Run both:

ShellExecute("Startup_Popup_Window_Killer.au3")

ControlCommand( )

 

Please advise.

  • 1 year later...
Posted

I ended up creating a second *.exe program that loops in the background to look for the popup window names.

Works well and severs as a GUI to display stats on the first program.

Thanks for the support!

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
×
×
  • Create New...