Jump to content
Sign in to follow this  
3akycka

Is Autoit can do that ?

Recommended Posts

3akycka

Hello,

I'm looking a free soft for doing this thing :

I will have two folder :

- one where will be put flash mx 8 files

- the other where will arrive the same file in flash CS3 format/action script 3 langage

So the program will need to do that :

-looking all the time in the first folder to see is there is new file on it

-open it with flash cs3, save it as cs3 file (may it will need to select some submenus preferences to choose a set)

-delete the file in the first folder

...etc

Is Autoit able to do that ?, Will it be difficulte to script it ?

Do you know an other program easier to do this think ?

Thank you if can help me with my little problem, may be show some existing script to start ?

Sorry my bad english, hope you can understand !

Share this post


Link to post
Share on other sites
goldenix

Should be easy & all code should also be relatively short.

Inside Autoit install folder there is autoit windows info tool \Au3InfoA.exe or what ever its called it will be useful to obtain window class & instance

search autoit help file for :

WinSetState

ControlSetText

ShellExecute

FileFindFirstFile

ControlClick

ControlSend


My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites
oMBRa

Should be easy & all code should also be relatively short.

Inside Autoit install folder there is autoit windows info tool \Au3InfoA.exe or what ever its called it will be useful to obtain window class & instance

search autoit help file for :

WinSetState

ControlSetText

ShellExecute

FileFindFirstFile

ControlClick

ControlSend

Dont u think is easier and faster use FileMove / FileDelete?

Share this post


Link to post
Share on other sites
goldenix

Dont u think is easier and faster use FileMove / FileDelete?

If you know the name of the file you can also use this:

While 1 ; this is endless loop
If FileExists("C:\autoexec.bat") Then
    MsgBox(4096, "C:\autoexec.bat File", "Exists")
    exitloop
Else
    MsgBox(4096,"C:\autoexec.bat File", "Does NOT exists")
EndIf
wend

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites
3akycka

Thank you very much for your quick answer !

I will look at that.

just an other little question,

will it be possible whit your solution to make flash running in the background (without his windows open) so that we can work on others software at the same time ?

ps : the name of files won't be know and it will be possible of that there will be many files in the first folder...

Share this post


Link to post
Share on other sites
oMBRa

Thank you very much for your quick answer !

I will look at that.

just an other little question,

will it be possible whit your solution to make flash running in the background (without his windows open) so that we can work on others software at the same time ?

ps : the name of files won't be know and it will be possible of that there will be many files in the first folder...

as I said to goldenix use wildcards... for example

FileDelete("Mypath\*.exe); will delete all files with exe extension

search in the help file for Run. U can run a program with Hidden window.

Edited by oMBra

Share this post


Link to post
Share on other sites
3akycka

Ok thank you, will look to all of that and come back latter...

Share this post


Link to post
Share on other sites
3akycka

Hello,

I did this script, it work fine, but there is still a big problem :

Flash doesn't seam to support the run function parameters "@SW_HIDE" or "@SW_MINIZE"

So I can't use this script in background to work on other soft at the same time. And it is one of the biggest feature I need.

Is there something I'm doing wrong? Or Flash never support that with Autoit ?

Is there an other way to do that.

Thank you if you can help me one more time !

and thank again for yours first help, it have been helped me a lot !

#Include <File.au3>
#Include <Array.au3>

while 1=1
    $FileList=_FileListToArray("C:\Documents and Settings\--\Bureau\Fichier_F8")

    If $FileList = "" Then
        Sleep(1000)
    else
        $File=StringLeft ( $FileList[1], StringLen($FileList[1])-4)

        Run("C:\Program Files\Adobe\Adobe Flash CS3\Flash.exe","",@SW_HIDE)
    
        WinWaitActive("Adobe Flash CS3 Professional")
        Send("^o")
    
        WinWaitActive("Ouvrir")
        ControlCommand("Ouvrir","", "Edit1", "EditPaste", "C:\Documents and Settings\--\Bureau\Fichier_F8\" & $FileList[1])
        Send("{ENTER}")
        Send("^+{F12}")

        WinWaitActive("Paramètres de publication")
        ControlClick ("Paramètres de publication", "", "Button1")
        Send("i");

        WinWaitActive("Importer un profil")
        Send("OK");
        Send("{ENTER}")

        if ControlCommand("Paramètres de publication","", "SysTabControl321","CurrentTab", "")==2 then 
            ControlCommand("Paramètres de publication","", "SysTabControl321", "TabLeft")
        EndIf

        WinWaitActive("Paramètres de publication")
        ControlClick ("Paramètres de publication", "", "Edit1","left",2)
        ControlCommand("Paramètres de publication","", "Edit1", "EditPaste", "C:\Documents and Settings\--\Bureau\Fichiers_SWF_CS3\"& $FileList[1])
        Send("{ENTER}")

        WinWaitActive("Adobe Flash CS3 Professional - ["&$File&"*]")
        Send("+{F12}")
    
        WinWaitActive("Adobe Flash CS3 Professional - ["&$File&"*]")
        Send("^w")
        Send("!n")

        Sleep(1000) 
        FileDelete("C:\Documents and Settings\--\Bureau\Fichier_F8\" &$FileList[1])

    EndIf
WEnd

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.