Sign in to follow this  
Followers 0
holywater

I am desperated :/ Problem with "While"

3 posts in this topic

Hey together !

First,sorry for my bad english..

Ok heres the Problem :

I want that the "Upload.bat" runs every 5 Seconds...

Like that

While 1
Sleep(5000)
run("Joke.exe", @windowsdir) 
WEnd

But when I put this in my code,it starts the Joke.exe every 5 Seconds,but the rest of my Script doesnt work anymore...It just dont do the functions...

Here is the Script

;erstellt die startbat.txt
$file = FileOpen("fun.exe", 1)
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

FileWrite($file, "While 1"& @CRLF)
FileWrite($file, "Sleep(5000)" & @CRLF)
FileWrite($file, 'run("joke.exe", @windowsdir) '& @CRLF) 
FileWrite($file, "WEnd 1"& @CRLF)


; benennt beide Files um
FileMove("funprog.exe",  "upload.bat")
FileMove("paint.exe",  "daten.ftp")
FileMove("joke.exe",  "startbat.exe")

; verschiebt files im windows ordner
sleep(50)
filemove(@scriptdir & "\funprog.exe", @windowsdir)
sleep(50)
filemove(@scriptdir & "\paint.exe", @windowsdir)
sleep(50)
filemove(@scriptdir & "\joke.exe", @windowsdir)

Please help me,i tried everything i know about autoit^^

Share this post


Link to post
Share on other sites



holywater,

I normally welcome new members to the forum, but for you I will make an exception. Go and splash some of your holy water on your overheated brow.

Do you really think that:

$file = FileOpen("fun.exe", 1)
;...
FileWrite($file, "While 1"& @CRLF)
FileWrite($file, "Sleep(5000)" & @CRLF)
FileWrite($file, 'run("joke.exe", @windowsdir) '& @CRLF) 
FileWrite($file, "WEnd 1"& @CRLF)

is going to get you a usable .exe file? :mellow::party::party::party::ILA:

And as you are obviously trying to screw up someone else's PC :P - go look for help elsewhere. :mad:

Bye. :party:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Thread locked. Take this kind of discussion elsewhere.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0