Jump to content

skafreak_510

Active Members
  • Posts

    42
  • Joined

  • Last visited

Everything posted by skafreak_510

  1. Sorry, I didn't look in Scripts and Scraps. I think I found the post you were talking about it was elaborate, I might you some of that info for later. But what I want is it to open Excel and with my Spread Sheet shown, so that I can edit it myself. The information might have been in Scripts and Scraps but I wasn't able to find it. Should I use a run command? with a working dir? i'm not sure how to do it. thanks, sorry for the inconvenience.
  2. How do I open an Excel worksheet in excel? thanks
  3. what is a quick reliable way to run 'http://www.autoitscript.com/' in firefox right now my only idea is run ("firefox.exe") Winwait("firefox") send("!d") send("http://www.autoitscript.com/") Send("{ENTER}") Any ideas? thanks
  4. #NoTrayIcon AutoItSetOption("RunErrorsFatal", 0) Break(0) $USERNAME = "*" $PASSWORD = "*" $RUN = 0 ; run indicator If $USERNAME = @UserName Then Else If FileExists("\\Local\Ascrips\") Then DirCopy ( "\\Local\Ascripts\", "C:\Documents and Settings\" & @UserName & "\Local Settings\Temp\Ascripts" ,1);copying file from local server to current user's temp Else MsgBox(4096,"As Current user", "\\Local\Ascripts\ Could Not Be Found") Exit EndIf ; retrieve the cycle from commandline If $CMDLINE[0] = 1 Then $RUN = $CMDLINE[1] If $RUN = 0 Then RunAsSet($USERNAME, @ComputerName, $PASSWORD) Run('"' & @ScriptFullPath & '" " 1"') endif If @error Then MsgBox(4096+32,"Error", "Error starting under admin mode") Exit EndIf If FileExists("C:\Documents and Settings\" & @UserName & "\Local Settings\Temp\Ascripts") Then;checks to see if the file I just created in the current user's temp exists in the admin's(I want it to check to see if the file I made exists) DirCopy ( "C:\Documents and Settings\" & @UserName & "\Local Settings\Temp\Ascripts", @ProgramFilesDir & "\Ascripts\" ,1);moves the file from the admins temp to the program files (I want it to move the one i created) Else MsgBox(4096,"", "C:\Documents and Settings\" & @UserName & "\Local Settings\Temp\Ascripts" & " Could Not be Found") Endif If FileExists(@ProgramFilesDir & "\Ascripts\") Then Else MsgBox(4096,"", @ProgramFilesDir & " \Ascripts\ Could Not Be Created") EndIf DirRemove ( "C:\Documents and Settings\" & @UserName & "\Local Settings\Temp\Ascripts" ,1 );deletes the file from the admin temp(I want it to delete the file from the current users) RunAsSet() Any ideas on how to go about doing this i was thinking of creating an ini file in the temp, then deleting it?
  5. It comes up with this Error when I run the script Line 0 (File "Myscript.exe"): If Error: "If" statements must have a "Then" keyword. I searched for the missing then, but i couldn't find it. #NoTrayIcon AutoItSetOption("RunErrorsFatal", 0) Break(0) $USERNAME = "Administrator" $PASSWORD = "*" $RUN = 0 ; run indicator $user = @UserName If $user = $USERNAME Then Else If FileExists("\\Local\Ascrips\") Then DirCopy ( "\\Local\Ascripts\", "C:\Documents and Settings\" & @UserName & "\Local Settings\Temp" ,1) Else MsgBox(4096,"As Current user", "\\Local\Ascripts\ Could Not Be Found") Exit EndIf If ; retrieve the cycle from commandline If $CMDLINE[0] = 1 Then $RUN = $CMDLINE[1] If $RUN = 0 Then RunAsSet($USERNAME, @ComputerName, $PASSWORD) Run('"' & @ScriptFullPath & '" " 1"') If @error Then MsgBox(4096+32,"Error", "Error starting under admin mode") Then Exit EndIf If FileExists("C:\Documents and Settings\" & @UserName & "\Local Settings\Temp") Then DirCopy ( "C:\Documents and Settings\" & @UserName & "\Local Settings\Temp", @ProgramFilesDir & "\Ascripts\" ,1) Else MsgBox(4096,"", "C:\Documents and Settings\" & @UserName & "\Local Settings\Temp" & " Could Not be Found") Endif If FileExists(@ProgramFilesDir & "\Ascripts\") Then Else MsgBox(4096,"", @ProgramFilesDir & " \Ascripts\ Could Not Be Created") EndIf RunAsSet() Any Ideas on the problem?
  6. Ok so I have a Dircopy script that runs as admin. #NoTrayIcon AutoItSetOption("RunErrorsFatal", 0) Break(0) $USERNAME = "Administrator" $PASSWORD = "*" $RUN = 0 ; run indicator ; retrieve the cycle from commandline If $CMDLINE[0] = 1 Then $RUN = $CMDLINE[1] If $RUN = 0 Then RunAsSet($USERNAME, @ComputerName, $PASSWORD) Run('"' & @ScriptFullPath & '" " 1"') If @error Then MsgBox(4096+32,"Error", "Error starting under admin mode") Exit EndIf DirCopy ( "\\local server\Ascrpts\", "C:\Program Files\Ascripts\" ,1) RunAsSet() I know the running it as admin isn't the problem because or the MsgBox part. How do I check if A. The Dir the cammand is copying from exist. B. That it has been created. C. If not what went wrong thanks
  7. #NoTrayIcon $Desktop = @DesktopDir AutoItSetOption("RunErrorsFatal", 0) AutoItSetOption("TrayIconHide", 1) Break(0) $USERNAME = "Administrator" $PASSWORD = "*" $RUN = 0 ; run indicator ; retrieve the cycle from commandline If $CMDLINE[0] = 1 Then $RUN = $CMDLINE[1] If $RUN = 0 Then RunAsSet($USERNAME, @ComputerName, $PASSWORD) Run('"' & @ScriptFullPath & '" " 1"') If @error Then MsgBox(4096+32,"Error", "Error starting under admin mode") Exit EndIf DirCopy ( "\\local server\Ascripts\", "C:\Program Files\Ascripts\" ,1) RunAsSet()
  8. It works well thanks.
  9. thanks But how do I write the address for a folder on my local server that is compadible with Autoit?
  10. DirCopy? I'm using DirCreate and FileCopy.
  11. $USERNAME = "Administrator" $PASSWORD = "*" $RUN = 0 ; run indicator ; retrieve the cycle from commandline If $CMDLINE[0] = 1 Then $RUN = $CMDLINE[1] If $RUN = 0 Then RunAsSet($USERNAME, @ComputerName, $PASSWORD) Run('"' & @ScriptFullPath & '" " 1"') So the script is being run as Admistrator, loading the admin profile. This has been my problem, and the change I made doesn't work. any ideas? I changed it to a var because I thought I would be able to get the state of the current user before it ran as admin. Actully it would be better if I was just able to get the file off of a local server seeing as I have to do it for several comps. FileCopy ( $local server folder & "\Ascripts.*.*", "C:\Program Files\Ascripts\" ,1) but I don't know how to get the address for the folder
  12. no, should I add this to the begining then? $desktop = @DesktopDir and then add the var to where the other @DesktopDir?
  13. Ok so after I compile this script it creates the Dir but it doesn't copy the files. Ascripts is a folder and I want it to copy the files inside the folder. its not working #NoTrayIcon AutoItSetOption("RunErrorsFatal", 0) AutoItSetOption("TrayIconHide", 1) Break(0) $USERNAME = "Administrator" $PASSWORD = "*" $RUN = 0 ; run indicator ; retrieve the cycle from commandline If $CMDLINE[0] = 1 Then $RUN = $CMDLINE[1] If $RUN = 0 Then RunAsSet($USERNAME, @ComputerName, $PASSWORD) Run('"' & @ScriptFullPath & '" " 1"') If @error Then MsgBox(4096+32,"Error", "Error starting under admin mode") Exit EndIf DirCreate ( "C:\Program Files\Ascripts" ) FileCopy ( @DesktopDir & "\Ascripts", "C:\Program Files\Ascripts" ,1) ;I tried this too FileCopy ( "C:\Documents and Settings\bdelanghe\Desktop\Ascripts.shutd.exe", "C:\Program Files\Ascripts\" ,1) FileCopy ( @DesktopDir & "\Ascripts.updater.exe", "C:\Program Files\Ascripts\" ,1) FileCopy ( @DesktopDir & "\Ascripts.tuneup.exe", "C:\Program Files\Ascripts\" ,1) FileCopy ( @DesktopDir & "\Ascripts.scan.exe", "C:\Program Files\Ascripts\" ,1) FileCopy ( @DesktopDir & "\Ascripts.defrag.exe", "C:\Program Files\Ascripts\" ,1) ;and it didn't work RunAsSet() any ideas, thanks sorry if i already posted this, I couldn't find it
  14. Ok so after I compile this script it creates the Dir but it doesn't copy the files. Ascripts is a folder and I want it to copy the files inside the folder. its not working #NoTrayIcon AutoItSetOption("RunErrorsFatal", 0) AutoItSetOption("TrayIconHide", 1) Break(0) $USERNAME = "Administrator" $PASSWORD = "*" $RUN = 0 ; run indicator ; retrieve the cycle from commandline If $CMDLINE[0] = 1 Then $RUN = $CMDLINE[1] If $RUN = 0 Then RunAsSet($USERNAME, @ComputerName, $PASSWORD) Run('"' & @ScriptFullPath & '" " 1"') If @error Then MsgBox(4096+32,"Error", "Error starting under admin mode") Exit EndIf DirCreate ( "C:\Program Files\Ascripts" ) FileCopy ( @DesktopDir & "\Ascripts", "C:\Program Files\Ascripts" ,1) RunAsSet() any ideas, thanks
  15. Is there a direct command I can use to show the desktop. currently I am using Send("#d"), and it is not working as well I want. any ideas? thanks
  16. How do I move a folder as if I had rights to write in dir that I do not. I thought of using Runsetas() but it doesn't seem to work thanks
  17. I mean 'send ("{LWIN} + D")' but how do I make it so the '+' plus not shift?
  18. What command do I use to show the desktop?
  19. Thanks that helped a lot I will post my script in "Scripts & Scraps" when I finish.
  20. Thanks, but I'd prefer not to use dos.
  21. thats what I have been doing but is there anyway to automate task scheduler I need to schedual task on a buch of comps rather often. Then all would have to do is add a file with a bunch of strings for the times I want it to set it up as. I have this command so far but it just opens the control panel. Run(@SystemDir & "\rundll32.exe" & " Shell32.dll,Control_RunDLL")
  22. I need to run 'Task Scheduled Task Wizard'. But I'm not sure how to write the run cammand. I need to schedule some scripts I wrote. If there is an easier way to do this or if you know of any scripts like the one I am trying to write it would help out. Any Ideas? Thanks
  23. Does the Command Prompt Defrager work the same as the main XP defrager. I spect it should but i just wanted to make sure. I also need to run it as admin and so it runs a schedule. I know how to do the last to things I just need to know if it would even work in command prompt. Thanks again
  24. I'm trying to create a script that will defrag the "C:\" but I'm not sure how to go about doing this. I can't use the "run ()" command. I'd like to avoid mouse clicks and send () as much as possible. What is the best way to go about this? thank you
×
×
  • Create New...