AutoIt

 

Q #1: I'm running into a bit of a problem.  What I'm wanting to do is run a

      program according to the display resolution.  As you'll see in the

      script I've pasted, but what I find is that it launches all 3 of them

      no matter what?  Probably something I've over looked!!

 

      RegRead, TestKey, REG_SZ, HKEY_CURRENT_CONFIG,Display\\Settings,Resolution

      IfEqual, TestKey, "1024,768", GOTO, internet

      IfEqual, TestKey, "800,600", GOTO, word

      IfEqual, TestKey, "640,480", GOTO, excel

 

      internet:

      run, c:\\program files\\internet explorer\\iexplore.exe

 

      word:

      run, c:\\program files\\microsoft office\\office\\winword.exe

 

      excel:

      run, c:\\program files\\microsoft office\\office\\excel.exe

 

      ---------------------------------------------------------------------

 

A #1: First of all, check to see the results of your RegRead by putting the

      Command

 

      MsgBox, 0, RegRead Results, Result=%TestKey%

 

      right after the RegRead, To make sure you are getting the results you

      think you should.  Once you are satisfied with that, you can remove

      the MsgBox command

     

      In addition add the goto commands I have shown here:

 

      ; ======= Scriptlet Starts Here =======

      RegRead, TestKey, REG_SZ, HKEY_CURRENT_CONFIG,Display\\Settings,Resolution

      IfEqual, TestKey, "1024,768", GOTO, internet

      IfEqual, TestKey, "800,600", GOTO, word

      IfEqual, TestKey, "640,480", GOTO, excel

     

      goto, end

     

      internet:

      run, c:\\program files\\internet explorer\\iexplore.exe

      goto, end

 

      word:

      run, c:\\program files\\microsoft office\\office\\winword.exe

      goto,end

 

      excel:

      run, c:\\program files\\microsoft office\\office\\excel.exe

 

      end:

      ; ======= Scriptlet Ends Here =======

 

-----------------------------------------------------------------------------

 

Q #2: I've created a script that uses the shortcut key option in the

      shortcuts properties (hmm... lemme explain this another way, Right-

      click on a shortcut, select properties, see 'shortcut key' you can

      assign hotkey for shortcuts) O.k. Not to insult anyone's intelli-

      gence, but I wanted everyone on the same page.)

 

      This script when called upon, will take a snapshot of the currently

      active screen, then open mspaint.exe, paste it, and save the file in

      the %YEAR%%MONTH%%DAY%.... format... it gives me a screenshot of each

      screen so I can go back later on and write a script that I was not

      able to spend the time during the initial install. So far, this

      method is starting to work out great, But I'd like a way to Open

      Autoit Reveal mode, take a snapshot of that window, saving it, then

      use it for later review for script making.

 

      Problem, you can not 'WinGetAtiveTitle' it, 'WinSetTitle', or any

      other similar steps. All Autoit based windows stay.... Autoit, or

      Aut2Exe. Does anyone know of a way to do this? is this in the plans

      for future versions? I can not get a snapshot (screenshot using print-

      screen key) of the Autoit window, which has all the text listed and

      mouse coordinates, etc... By being able to do this, a script can be

      written at a later time, that would work fine, as all info on the

      AutoIt screen is intact, but the inability to printscreen the AutoIt

      window prevents this cool usage.

 

      ---------------------------------------------------------------------

 

A #1: I use this code to capture error messages and printscreen them. Open

      two AutoIt reveal windows, to get your exact AutoIt version and

      Window Title.

 

      ; ======= Scriptlet Starts Here =======

      SetTitleMatchMode, 2

      WinActivate, AutoIt v2.41 - (C)2000 Jonathan Bennett.

      WinWaitActive, AutoIt v2.41 - (C)2000 Jonathan Bennett.

      SEND, #{ALTDOWN}#{PRINTSCREEN}#{ALTUP}

      SLEEP, 1000

      WinMinimize, AutoIt v2.41 - (C)2000 Jonathan Bennett.

      WinMaximize, untitled - Paint

      WinWaitActive, untitled - Paint

      SLEEP, 2000

      SEND, #{CTRLDOWN}#v#{CTRLUP}#{ENTER}

      ; ======= Scriptlet Ends Here =======

 

      ---------------------------------------------------------------------

 

A #2: Try using:      send, {PRINTSCREEN}

      rather than: send, !{PRINTSCREEN}

 

      that should capture the whole screen, not just the active window.

      That would get you the application's and the autoit reveal window....