Jump to content

Mid Function Popup


Recommended Posts

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. :) 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 year later...

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
 Share

×
×
  • Create New...