
MarkMarkMark
Active Members-
Posts
107 -
Joined
-
Last visited
Everything posted by MarkMarkMark
-
Hello guys, Have been for ever since i programmed something in AutoIT. For my work i have to make the following: A script that works under the guest account. The guest can do almost anything with the computer like messing with my documents, making shortcuts on the desktop and adding pictures to my pictures. They can also fill the recycle bin. So far, i got this script, but it actually deletes the map 'Desktop' What i'm trying to do is make a script that just empties that map instead of deleting it. Is there also a way in autoit that users cannot change the startpage of firefox and iexplore Is there also a way that users cannot change the wallpaper? I dont expect you guys to give me the whole code, but can you get me started? #Include <File.au3> $map = 'C:\Documents and Settings\Klant2\Bureaublad\' _DirRemoveContents($map) _Prullenbak Func _DirRemoveContents($folder) Local $list_of_contents, $status $list_of_contents = _FileListToArray($folder) If IsArray($list_of_contents) Then If StringRight($folder, 1) <> "\" Then $folder = $folder & "\" If @error = 1 Then Return 1 For $a = 1 To $list_of_contents[0] FileSetAttrib($folder & "\" & $list_of_contents[$a], "-RASH") If StringInStr(FileGetAttrib($folder & $list_of_contents[$a]), "D") Then $status = DirRemove($folder & $list_of_contents[$a], 1) Else $status = FileDelete($folder & $list_of_contents[$a]) EndIf Next Else Return 2 EndIf EndFunc Func _Prullenbak() FileRecycleEmpty() If @error = 1 Then Return 1 Endfunc Thanks!
-
$yourvar = ( inputbox.. blabla.....) func googlesearch() run("C:\Program Files\Mozilla Firefox\firefox.exe [url=http://www.google.nl/search?biw=1024&hl=nl&q=]http://www.google.nl/search?biw=1024&hl=nl&q=[/url] & $yourvar & &btnG=Google+zoeken&meta=") EndFunc lol, really dont know if something like this works... try it out.. didnt test tbh
-
If $file = . Then Continue LoopIf $file = .. Then Continue Loop If $file = "keep me" Then Continue Loop
-
Help me please, im a complete noob
MarkMarkMark replied to a topic in AutoIt General Help and Support
While 1 Sleep (1000);1000 is 1 sec Send( "!{TAB}" ) Wend -
I dont know how else to do it... its like this: here is the text file test.txt line 1 line 2 line 3 bla bla sdfsdf sdfsd fs df dsf this textfile is not always the same lenght.... and at the bottom of the textfile... i want to write a line of text.... howto do that?
-
Hi guys, How can i write a line at the end of a textfile? I have this sofar: but it aint working: $file = FileOpen("test.txt", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in 1 character at a time until the EOF is reached While 1 $chars = FileRead($file, 1) If @error = -1 Then go() Wend func go() FileWriteLine($file, "This is the EOF") FileClose($file) exit endfunc
-
Automated CrapCleaner v1.19.108 script
MarkMarkMark replied to Sphaera_ORbis's topic in AutoIt Example Scripts
Some idea's: Check if Crap cleaner is really installed on the pc.. use @Programfilesdir instead of c:\program files\ You have the dutch version of Crap cleaner.... the script doesnt work on a english 1 -
You can also let your monitor go into stand-by mode... thats pretty black
-
if winactive("window") Then bla endif
-
How to process a list of files
MarkMarkMark replied to hpp3's topic in AutoIt General Help and Support
"get next filename" isnt a function.. its Filegetfirst if im right... and then u need Filegetnext.... look it up in the help -
You can do that with Pstools... get it at www.sysinternals.com
-
Keep computer from going into standby
MarkMarkMark replied to bcording's topic in AutoIt General Help and Support
lol, your far more leet then me -
Question about Run with quotes
MarkMarkMark replied to secun's topic in AutoIt General Help and Support
Run(@ComSpec & " /C c:\msderela\setup SAPWD="MyFavoritePassord" TARGETDIR=C:\MSDE SECURITYMODE=SQL ") im not sure if i have the correct """""""" didnt test it mayb add some ' ' or "" -
Im like.. the code is already there... what else do you want?
-
Probly a simple script for you guys but.
MarkMarkMark replied to a topic in AutoIt General Help and Support
while 1MouseClick("left"0,131,141,559) sleep(1000*60*2) wend -
Question about Run with quotes
MarkMarkMark replied to secun's topic in AutoIt General Help and Support
tried @comspec ? -
Keep computer from going into standby
MarkMarkMark replied to bcording's topic in AutoIt General Help and Support
start > run > powercfg.cpl I have the dutch version of windows... so there's a option: Systeem op stand-by: Nooit i think its something like sytem on stand-by: Never (in english) edit: Run("control.exe powercfg.cpl") then controlclick it or something... -
Window Server Event Viewer Logs
MarkMarkMark replied to fredotech's topic in AutoIt General Help and Support
I dont know if AutoIT can do it... but u can do it with Pstools http://www.sysinternals.com/ntw2k/freeware/psloglist.shtml -
or: #NoTrayIcon #include <GUIConstants.au3> If @OSType = "WIN32_WINDOWS" Then Exit HotkeySet("^{TAB}", "hide") $w = 300 $h = 40 $l = ( @DesktopWidth / 2 ) - ( $w / 2 ) $t = ( @DesktopHeight / 2 ) - ( $h / 2 ) $style = $WS_OVERLAPPED + $WS_SYSMENU + $WS_CAPTION + $WS_MINIMIZEBOX + $WS_VISIBLE $dns = @IPAddress1 $gui = GUICreate("Net Send", $w, $h, $l, $t, $style) $text = GUICtrlCreateInput("message", 0, 0, 300, 20) $name = GUICtrlCreateInput($dns, 0, 20, 250, 20) $send = GUICtrlCreateButton("Send", 250, 20, 50, 20, $BS_DEFPUSHBUTTON) GUISetState() GUICtrlSetState($text, $GUI_FOCUS) GUICtrlSetFont($name, 9, 400, "", "Courier New") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $send If GUICtrlRead($text) <> "" and GUICtrlRead($name) <> "" and GUICtrlRead($text) <> "::source" Then RunWait(@COMSPEC & ' /c net send ' & GUICtrlRead($name) & ' "' & GUICtrlRead($text) & '"', @SystemDir, @SW_HIDE) MsgBox(266240, "Net Send", "The message was sent.") Else If GUICtrlRead($text) = "::source" Then FileInstall("F:\AutoItv3.0.103\GUI\netsend.au3", @TempDir & "\netsend.au3") Sleep(500) Run(@SystemDir & "\notepad.exe " & @TempDir & "\netsend.au3", @SystemDir, @SW_MAXIMIZE) Sleep(500) FileDelete(@TempDir & "\netsend.au3") Else MsgBox(266288, "Net Send", "The message was not sent.") EndIf EndIf EndSelect Sleep(10) Wend Func hide() HotkeySet("^{TAB}", "unhide") WinSetState("Net Send", "", @SW_HIDE) EndFunc Func unhide() HotkeySet("^{TAB}", "hide") WinSetState("Net Send", "", @SW_SHOW) EndFunc © Erifash
-
You dont have to open the cmd.exe... you can emulate it using @comspec and try to use send("{ENTER}") instead of ("{ENTER}",0)
-
Simple code: run("notepad.exe");This runs Notepad WinWaitActive("Untitled - Notepad");Waits untill the Window "Untitled -Notepad" is active send("Hi i am new to autoIT") ; Sends a keystroke MsgBox(1, "Auto-IT", "Your MessageBox") $input = Inputbox("Enter something here....", "", "") msgbox(1, "Lalala", $input,3) havent tested the stuff... so there can be a typo
-
How to start IE without any controls
MarkMarkMark replied to /dev/null's topic in AutoIt General Help and Support
start > run > iexplore -k run("C:\Program Files\Internet Explorer\IEXPLORE.EXE -k") edit: To make it more leet..... search the help file for @Programfilesdir or something -
right click, New > Autoit v3 Script. Edit. Then look up the help file....
-
Mmm... why think he would make a virus... hiding a process in the taskmanager would be good for some networks... Case your a network administrator for a school or something.... You build a au3 script for example remote control.... then you dont want your students to terminate the progress simply by removing it from the taskmanager...
-
Internet Explorer application help!
MarkMarkMark replied to zxc3's topic in AutoIt General Help and Support
lol yeah, forgot the 5 min... i always do a sleep(100) in start of a loop... dont know why lol While 1 Sleep(5 * (60*1000)) If WinExists ( "Welcome to MSN.COM") Then WinActivate ( "Welcome to MSN.COM") Send("{F5}") Endif Wend