Results 1 to 14 of 14
  1. #1
    New Lounger
    Join Date
    May 2002
    Location
    Cleveland, Ohio, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Window XbyY at AxB

    I am looking for a command line entry which will open up the printer queue window for a particular printer at a size of X wide by Y tall, at screen location A by B.

    My purpose is to build a simple utility which will display ALL of the 10+ queues I monitor, ALL on the screen at the same time. This will give me the ability at any time to determine if any of the queues/printers might be having difficulties.

  2. #2
    5 Star Lounger
    Join Date
    Dec 2002
    Location
    Perth, Western Australia, Australia
    Posts
    730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Window XbyY at AxB

    I doubt there's a way via the command line (pity). You might have some luck trawling through the Software Finds and Wants forum (in the absence of Search).

    I do remember seeing utilities with this functionality, but a quick Google yielded nothing obvious.
    <font face="Comic Sans MS" color="blue">TimOz</font>
    <img src=/S/flags/Finland.gif border=0 alt=Finland width=30 height=18> <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  3. #3
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Window XbyY at AxB

    You might want to have a look at AutoIt. You could probably utilize this command in a script:

    WinMove, <Window Title>, [<Window Text>], <X>, <Y>, <Width>, <Height>

    If the window in Title and Text exists, it is moved to <X>, <Y> and resized to <Width>, <Height>

    e.g.

    Run, notepad.exe
    WinWaitActive, Untitled - Notepad
    WinMove, Untitled - Notepad,, 0, 0, 100, 100

    This moves the notepad window to 0,0 and changes the size of the window to 100,100

    Remember to include the comma if you don't specify Window text. "default" can be used in place of Width and Height if you don't want to change the size of the window

  4. #4
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Window XbyY at AxB

    Just to test my theory, I put shortcuts in STARTUP for the two print devices on another machine on my home LAN. This gets the print queues open on screen. Then I ran the following AutoIt script:

    IfWinExist, HP 970C on GATEWAY,, WinMove, HP 970C on GATEWAY,, 0, 0, 600, 300
    IfWinExist, CoStar LabelWriter XL Plus,, WinMove, CoStar LabelWriter XL Plus,, 200, 200, 600, 300

    Now I'm wondering - if you put shortcuts in your Startup for all 10 print devices, then position and size them as you want, wouldn't they open that way on next reboot, negating the need to do anything? Just curious.....

  5. #5
    5 Star Lounger
    Join Date
    Dec 2002
    Location
    Perth, Western Australia, Australia
    Posts
    730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Window XbyY at AxB

    Good call on AutoIt Al, don't know why I missed the "obvious" <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    You're probably right on the Startup approach, but I got the impression Piperson wants to be able to run his custom utility at any time to bring up all the print queues to check on. If so, AutoIt fits the bill nicely. And he can use a similar utility to close all the queue windows in one hit when finished checking.
    <font face="Comic Sans MS" color="blue">TimOz</font>
    <img src=/S/flags/Finland.gif border=0 alt=Finland width=30 height=18> <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  6. #6
    New Lounger
    Join Date
    May 2002
    Location
    Cleveland, Ohio, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Window XbyY at AxB

    The approach is interesting, but the need to open/close them on demand is essential.

    Anyway, I downloaded the AutoIt material and am currently reading all the doc. A quick edit of your two lines into my environment lead to the following:

    IfWinExist, Konica 2200 Analex on MORGOTH3,, WinMove, Konica 2200 Analex on MORGOTH3,, 0, 0, 600, 300
    IfWinExist, Konica 2300 ZIN on MORGOTH3,, WinMove, Konica 2300 ZIN on MORGOTH3,, 200, 200, 600, 300

    My first edit effort was done with WordPad which lead to an AutoIT error about fonts. Duh! I did it over with NotePad and took out the trash left over from WordPad. The AutoIt ran without error, but also without results. I guess I still have some reading to do.

    Thanks for the lead.

  7. #7
    5 Star Lounger
    Join Date
    Dec 2002
    Location
    Perth, Western Australia, Australia
    Posts
    730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Window XbyY at AxB

    To help with script development, remember to use AutoIt Reveal Mode. It gives you a window that "spies" on what's going on with the other windows, dialogs, etc. For example, to make sure I get the 'exact window titles for "win..." commands, I usually cut & paste them from Reveal.

    Another generic "debug" method I find useful is to display the progress thru the script, and variable values etc. With AutoIt the simplest way is via MsgBox, although if you want to get fancy, you could even write out a log file with the script. Once working, all the debug steps can be either discarded, or commented out.
    <font face="Comic Sans MS" color="blue">TimOz</font>
    <img src=/S/flags/Finland.gif border=0 alt=Finland width=30 height=18> <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  8. #8
    New Lounger
    Join Date
    May 2002
    Location
    Cleveland, Ohio, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Window XbyY at AxB

    Well adding the MsgBox entries has shown me that the following script IS running. However, it still fails to produce any queue windows.

    ; Start of Script

    MsgBox, 0, Example, This is before the first window.
    IfWinExist, 1- HP LJ 4 Plus,, WinMove, 1- HP LJ 4 Plus,, 0, 0, 600, 300

    MsgBox, 0, Example, This is after the first window.
    IfWinExist, Konica 2300 ZIN on MORGOTH3,, WinMove, Konica 2300 ZIN on MORGOTH3,, 200, 200, 600, 300

    MsgBox, 0, Example, This is it folks.

    ; End of script
    Exit


    A different approach to this queue display problem was compiled by one of my local programmers. I am attaching a copy of that executable.

  9. #9
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Window XbyY at AxB

    I think the solution is right here at your fingertips now. It's also possible that I might have led you to believe that the sample script would do the whole job, and it wasn't intended that way. My assumption from the git-go was that you would get the windows open - in a manner of your choosing. Then the AutoIt script can certainly size and move them where you want them to be.

    OK, here's what I wonder now. If you enhance your AutoIt script to "run" your OpenPrinters program first, then testing for the presence of the windows, size and move them. If your OpenPrinters program STAYS open, you could then close everything with its provided Close button. Think it'll work?

  10. #10
    New Lounger
    Join Date
    May 2002
    Location
    Cleveland, Ohio, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Window XbyY at AxB

    That attachment does fill my immediate needs. However, your first message pointed me to a new utility (AutoIT) which offers me many new options. (That is if I can get my programming brain cells functioning again.)

    I appreciate the suggestions.......

  11. #11
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Window XbyY at AxB

    Yeah, and I don't know what's the matter with my brain cells this week! If you open all the print queue windows manually, size and position them and then close 'em all, THEN run your program, the windows will open to the size and location previously set. I tried sizing and positioning after opening with your program and the settings are not remembered. But if you do it manually, they are. You're rockin' and rollin' sounds like to me..... But, you're right - AutoIt is a NICE program to have around and I'm glad Tim pointed ME to it.

  12. #12
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Window XbyY at AxB

    Just came across WinControl - it may be of interest . . .

  13. #13
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Window XbyY at AxB

    Wow, that's a loaded site, Leif! Thanks for posting it.

  14. #14
    5 Star Lounger
    Join Date
    Dec 2002
    Location
    Perth, Western Australia, Australia
    Posts
    730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Window XbyY at AxB

    I had a look at the 12Ghosts goodies a while back, and remember the ones I tried were OK. Unfortunately, the cost/benefit equation wasn't so OK (for me). The utilities maybe reasonable value for work purposes, but a bit of a luxury for home use.
    <font face="Comic Sans MS" color="blue">TimOz</font>
    <img src=/S/flags/Finland.gif border=0 alt=Finland width=30 height=18> <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •