Jump to content

Recommended Posts

Posted

Hello again.

I'm using ShellExecute to open a printer server window and also opening an advisory MsgBox.

I have given the message box the 262144 flag to make sure it's on top, but I also wish to open another

server window using ShellExecute, and would like the two windows to be side-by-side with the advisory

message box topmost.

Is it possible to position the resulting windows and message box on the screen?

Thanks.

Posted

ShellExecute cannot direct a window where to go. Look at WinMove()

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Posted

... Is it possible to position the resulting windows and message box on the screen? ...

Welcome to the forum.

I'm not 100% positive that you asked about moving the MsgBox - but doing that is not so simple. The script halts awaiting the user's action, so using a WinMove after a MsgBox will not move that MsgBox. A GUI might be better ot you can wade thru this thread: http://www.autoitscript.com/forum/index.php?showtopic=22531

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

Welcome to the forum.

I'm not 100% positive that you asked about moving the MsgBox - but doing that is not so simple. The script halts awaiting the user's action, so using a WinMove after a MsgBox will not move that MsgBox. A GUI might be better ot you can wade thru this thread: http://www.autoitscript.com/forum/index.php?showtopic=22531

Hello herewasplato.

Thanks for the welcome!

I'm not going to bother with moving a message box, but I wonder if anybody can help me with this. I can't get the window

to move to where I want it. Any hints?

ShellExecute("\\<PrintServerName>")

WinMove("\\<PrintServerName>","",10,20, 600,760)

All suggestions gratefully received.

Cheers.

Posted (edited)

ShellExecute("\\<PrintServerName>")
WinMove("\\<PrintServerName>","",10,20, 600,760)

Is "\\<PrintServerName>" the name of the window that that command brings up? Check out the help file if you haven't already. Has a BUNCH of information, on a lot of things, the forums are where you go for obscure thing or when you get completely stuck, which I just have with SRE, so now I go and search. :/ Edited by BAM5

[center]JSON Encoding UDF[/center]

Posted

Hello herewasplato.

Thanks for the welcome!

I'm not going to bother with moving a message box, but I wonder if anybody can help me with this. I can't get the window

to move to where I want it. Any hints?

ShellExecute("\\<PrintServerName>")

WinMove("\\<PrintServerName>","",10,20, 600,760)

All suggestions gratefully received.

Cheers.

The ShellExecute line of code runs and then a few microseconds later your WinMove line runs.

Try adding a WinWait...

ShellExecute("\\<PrintServerName>")

WinWaitActive("\\<PrintServerName>")

WinMove("\\<PrintServerName>","",10,20, 600,760)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

The ShellExecute line of code runs and then a few microseconds later your WinMove line runs.

Try adding a WinWait...

ShellExecute("\\<PrintServerName>")

WinWaitActive("\\<PrintServerName>")

WinMove("\\<PrintServerName>","",10,20, 600,760)

Perfect! Thank-you very much herewasplato!

Cheers.

Yes, Bam5, I am aware of the Help file and it is very good. I will only post here if I cannot find the solutions I seek

elsewhere. Thanks.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...