[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More adventures in game crunching...



Changes needed for AppleWin:
 
; ----------------------------------------------------------------------------
; AutoIt Version: 3.1.0
; Author: Laine Houghton <
laine@intergate.com>
;
; Script Function: Crop and save AppleWin screen capture as jpgs
; ----------------------------------------------------------------------------
 
; case sensitive
$Title= "Apple"  ;title of emulator.
$Dir= "C:\Images\" ;Directory to save images in
$path= 0           ;final path with image name
$Result= 0         ;general use
 
$Result = WinExists ($Title) ;Is emulator alive?
If $Result=0 Then
 MsgBox(0, "Error", "Emulator not running..... Aborting")
 Exit
EndIf
 
;Set the emulator at idle so it doesn't eat cpu cycles
$Result = ProcessSetPriority($Title & "win.exe", 0)
If $Result=0 Then
 MsgBox(0, "Error", "Can't slow the emulator down." & @CRLF & "The computer might act sluggish")
EndIf
 
FindFreeFile() ;Set the path
WinActivate ($Title) 
Send ("!{PRINTSCREEN}")
Run ("C:\WINDOWS\system32\mspaint.exe", $Dir, @SW_MAXIMIZE)
WinWaitActive ("untitled - Paint")
Send ("^v") ;control V -> paste
MouseClick  ("left",40,60,1,1) ;click select
MouseClick  ("left",20,300,1,1) ;click transparent
MouseClickDrag ("left",67,83,628,468,1) ;select the sweet stuff
Send ("^c^n") ;control Copy control New
WinWaitActive ("Paint") ;want to save ???
Send ("!n") ; no thank you
Send ("^e") ;set atributes
WinWaitActive ("Attributes")
Send ("1{TAB}1{ENTER}") ;smaller window
Send ("^v") ; paste the sweet stuff
Send ("^s") ;save
WinWaitActive ("Save As")
Send ($path)
Send ("{TAB}") ;select JPG
Send ("{DOWN}")
Send ("{HOME}")
Send ("{DOWN 4}")
Send ("{ENTER}")
Send ("!s") ;Save it
Send ("!{F4}") ;Kill Paint
Sleep (1000) ;Don't let the emulator recoup before windows gets going
;Crank the emulator back up
$Result = ProcessSetPriority($Title & "win.exe", 2)
If $Result=0 Then
 MsgBox(0, "Error", "Can't speed the emulator up." & @CRLF & "Restart the emulator.")
EndIf
 
Exit ;All done, get another screen and launch me again
 
Func FindFreeFile()
 For $n = 1 to 100
  $path = $Dir & "Image " & $n & ".jpg"
  $Result= FileExists ( $path ) ;1 file exist
  If $Result = 0 Then
   ExitLoop
  EndIf
 Next
 If $n >100 Then
  MsgBox(0, "ERROR", "Files 1 through 100 used...Aborting")
  ;Crank the emulator back up
  $Result = ProcessSetPriority($Title & "win.exe", 2)
  If $Result=0 Then
   MsgBox(0, "Error", "Can't speed the emulator up." & @CRLF & "Restart the emulator.")
  EndIf
  Exit
 EndIf
EndFunc
 
 
 
 
 
 
 
"Laine Houghton" <laine@intergate.com> wrote in message 11sl11o26u46h93@corp.supernews.com">news:11sl11o26u46h93@corp.supernews.com...

> Lyrical perhaps AutoIt will help
> I create shortcuts to scripts and keep them on/in my task bar
>
> Compiler
>
http://www.autoitscript.com/autoit3/downloads.php
> Editor:
>
http://www.autoitscript.com/autoit3/scite/
>
> If you have AppleWin change $Title
> You should be able to modify this script to work..
>
> ; ----------------------------------------------------------------------------
> ; AutoIt Version: 3.1.0
> ; Author: Laine Houghton <
laine@intergate.com>
> ;
> ; Script Function: Crop and save AppleWin screen capture as jpgs
> ; ----------------------------------------------------------------------------
>
> ; case sensitive
> $Title= "ROBOWIN"  ;title of emulator. Might be AppleWin
> $Dir= "C:\Images\" ;Directory to save images in
> $path= 0           ;final path with image name
> $Result= 0         ;general use
>
> $Result = WinExists ($Title) ;Is emulator alive?
> If $Result=0 Then
> MsgBox(0, "Error", "Emulator not running..... Aborting")
> Exit
> EndIf
>
> ;Set the emulator at idle so it doesn't eat cpu cycles
> $Result = ProcessSetPriority($Title & ".exe", 0)
> If $Result=0 Then
> MsgBox(0, "Error", "Can't slow the emulator down." & @CRLF & "The computer might act sluggish")
> EndIf
>
> FindFreeFile() ;Set the path
> WinActivate ($Title)
> Send ("!{PRINTSCREEN}")
> Run ("C:\WINDOWS\system32\mspaint.exe", $Dir, @SW_MAXIMIZE)
> WinWaitActive ("untitled - Paint")
> Send ("^v") ;control V -> paste
> MouseClick  ("left",40,60,1,1) ;click select
> MouseClick  ("left",20,300,1,1) ;click transparent
> MouseClickDrag ("left",67,83,628,468,1) ;select the sweet stuff
> Send ("^c^n") ;control Copy control New
> WinWaitActive ("Paint") ;want to save ???
> Send ("!n") ; no thank you
> Send ("^e") ;set atributes
> WinWaitActive ("Attributes")
> Send ("1{TAB}1{ENTER}") ;smaller window
> Send ("^v") ; paste the sweet stuff
> Send ("^s") ;save
> WinWaitActive ("Save As")
> Send ($path)
> Send ("{TAB}") ;select JPG
> Send ("{DOWN}")
> Send ("{HOME}")
> Send ("{DOWN 4}")
> Send ("{ENTER}")
> Send ("!s") ;Save it
> Send ("!{F4}") ;Kill Paint
> Sleep (1000) ;Don't let the emulator recoup before windows gets going
> ;Crank the emulator back up
> $Result = ProcessSetPriority($Title & ".exe", 2)
> If $Result=0 Then
> MsgBox(0, "Error", "Can't speed the emulator up." & @CRLF & "Restart the emulator.")
> EndIf
>
> Exit ;All done, get another screen and launch me again
>
> Func FindFreeFile()
> For $n = 1 to 100
>  $path = $Dir & "Image " & $n & ".jpg"
>  $Result= FileExists ( $path ) ;1 file exist
>  If $Result = 0 Then
>   ExitLoop
>  EndIf
> Next
> If $n >100 Then
>  MsgBox(0, "ERROR", "Files 1 through 100 used...Aborting")
>  ;Crank the emulator back up
>  $Result = ProcessSetPriority($Title & ".exe", 2)
>  If $Result=0 Then
>   MsgBox(0, "Error", "Can't speed the emulator up." & @CRLF & "Restart the emulator.")
>  EndIf
>  Exit
> EndIf
> EndFunc
>
>
>
>
>
>
>