Support for command line

62 views
Skip to first unread message

Menegazzo

unread,
Apr 2, 2009, 7:36:37 AM4/2/09
to wink-discuss
Hi all,

I have some Wink projects saved in the same folder which I want to
render to SWF format. Instead opening each one and asking for
rendering is there any option to make this using the command line?

I found nothing about command line support so, if someone knows about
it tell me, please!!!

Best regards,
Fabio Menegazzo

wellilein

unread,
Apr 6, 2009, 7:38:31 AM4/6/09
to wink-discuss
Hi,

it seems there's no command line support. But it can be done using
AutoIt (http://www.autoitscript.com/autoit3/index.shtml)
I had the same issue and solved it like this (please check folder
names to match your system).
--- autoit ---
; Match substrings in window titles
Opt("WinTitleMatchMode", 2)

$folder = "C:\mywinkfolder"
CompileAllFiles($folder)

Func CompileAllFiles(Const $folder)
$search = FileFindFirstFile($folder & "\*.wnk")

If $search = -1 Then
; no files found
Exit
EndIf

While 1
$file = FileFindNextFile($search)
If @error Then ExitLoop
CompileWinkFile($folder,$file)
WEnd
FileClose($search)
EndFunc

Func CompileWinkFile(Const $folder, Const $filename)
ShellExecute("c:\Program Files\DebugMode\Wink\wink.exe",'"' & $folder
& "\" & $filename & '"')
; Wait for Wink to open
WinWait($filename)
; Wait 2 seconds until file is opened
Sleep(2000)
; If it opens in background, activate it
WinActivate($filename)
; Start rendering
Send("{F7}")
do
; assume that rendering is complete
$rendercomplete = True
; give it another 2 seconds for rendering
Sleep(2000)
If WinExists("Rendering") Then
; If window is still there, rendering is not yet complete
$rendercomplete = False
EndIf
until $rendercomplete = True
; If someone put it to background, make it active again
WinActivate($filename)
; Close the program
Send("!{F4}")
EndFunc
--- end autoit code ---

Have a nice day,
wellilein

WinToWeb

unread,
Apr 6, 2009, 9:03:49 AM4/6/09
to wink-d...@googlegroups.com
Owesome script. Thanks!

Dan
Reply all
Reply to author
Forward
0 new messages