[OS X] screenCapture

Übersicht BlitzMax, BlitzMax NG Codearchiv & Module

Neue Antwort erstellen

beanage.johannes

Betreff: [OS X] screenCapture

BeitragMo, Jan 25, 2010 20:01
Antworten mit Zitat
Benutzer-Profile anzeigen
Habe mal eine klein Funktion geschrieben die ein bisschen code ersparen soll.
Mit der Funktion kann man unter MacOS X ScreenCaptures erstellen.

Mode:

m - Nur Hauptmonitor
s - Mausmodus
w - Fenstermodus
i - Maus- oder Fenstermodus

Delay:

Selbstauslöser-Zeit

Path:

Pfad der zu speichernden Datei

Format:

Format der Datei ( png, jpg, bmp, gif, pdf, pict )

Sound:

Clicksound on/off

Cursor:

Maus sichtbarkeit on/off

BlitzMax: [AUSKLAPPEN]

Function screenCapture( _path:String, _mode:String = "m", _delay:Float = 0.0, _format:String = "png", _sound:Byte = 0, cursor:Byte = 1 )

?MacOS

Local args:String

args:+ String( " -" + _mode )
args:+ String( " -T " + _delay )
args:+ String( " -t " + _format )

If _cursor = 1 Then args:+ String( " -C")
If _sound = 0 Then args:+ String( " -x")

args:+ String( " " + _path )

system_ ( "screencapture" + String( args ) )

?

EndFunction

Neue Antwort erstellen


Übersicht BlitzMax, BlitzMax NG Codearchiv & Module

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group