Jump to content

cyberguy91

Members
  • Posts

    5
  • Joined

  • Last visited

About cyberguy91

  • Birthday 05/02/1991

Profile Information

  • Location
    Nampa, Idaho
  • Interests
    Technology, tech, and........
    computers? lol

cyberguy91's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I already wrote a su command, so I decided to make a sudo command to go with it. Here it is: #NoTrayIcon #RequireAdmin #include <Array.au3> $runcmd = _ArrayToString($CmdLine, " ", 1) Run($runcmd) Exit
  2. I was looking for a Windows equivalent to the linux su command. I found one topic on here, but it is outdated and doesn't work for me. So, I wrote a small script to emulate the su command. #NoTrayIcon #RequireAdmin Run("cmd.exe", @UserProfileDir) Exit This should bring up the UAC prompt if you have UAC enabled, otherwise it should just launch. Also, you can change the "@UserProfileDir" section to whatever directory you want the command prompt to start in, I just usually need it in the profile directory.
  3. I think you mean InetGet
  4. I realize this is a bit niche, but useful nonetheless. This is a script that saves the daily wallpaper from the Bing Desktop application. It checks to see if Bing Desktop is installed, checks to see if an image has been downloaded by the application, then attempts to copy it, checking to see if the image has already been saved, in which case it offers to overwrite the image. ; Bing Desktop Wallpaper Saver ; Created by cyberguy91 ; 04/28/2012 ;Image Destination $dest = @UserProfileDir & "\Pictures\BingWallpaper " & @MON & "-" & @MDAY & "-" & @YEAR & ".jpg" ;Check that Bing Desktop is installed $check = FileExists(@ProgramFilesDir & "\Microsoft\BingDesktop\") If $check = True Then saveimage() Else MsgBox(1, "Error", "Bing Desktop is not installed.") EndIf ;Image Saving Function Func saveimage() If FileExists(@UserProfileDir & "\AppData\Local\Microsoft\BingDesktop\themes\image.jpg") = True Then If FileExists($dest) Then $exists = MsgBox(4, "Error", "The file already exists. Overwrite?") Select Case $exists = 6 FileCopy(@UserProfileDir & "\AppData\Local\Microsoft\BingDesktop\themes\image.jpg", $dest, 1) Exit Case $exists = 7 Exit EndSelect Else FileCopy(@UserProfileDir & "\AppData\Local\Microsoft\BingDesktop\themes\image.jpg", $dest) EndIf Else MsgBox(1, "Error", 'Could not locate image. Are you sure you have selected "Make the daily homepage image your background desktop" in Bing Desktop?') EndIf EndFunc ;==>saveimage
  5. Hey everybody. Don't know if anyone still reads this thread, but I coded my own code to launch SciTe portably. Could someone take a look at it and see if there is anything that I'm missing to make it truly portable? #Include <File.au3> #NoTrayIcon ;Self-explanitory, hides the sometimes tacky tray icon that by default shows when a script is running. ;==============================Variables (see comments for more info)======================================== $au3props = @ScriptDir & "\App\SciTe\properties\au3.properties" ;$au3props is where the properties file (au3.properties) is. $au3folder = @ScriptDir & "\App\" ;$au3folder is where the folder is located. Change this if you want to, ;for example, place the launcher in the same directory as Autoit3 or SciTe. $workingdir = $au3folder ;$workingdir is what working directory you want to use in SciTe. (e.g. folder you want it to default to when saving a script.) ;You can use $workingdir = $au3folder if you wish to save in the Portable Autoit3 directory (or wherever you specified that Autoit is located.) _FileWriteToLine ( $au3props, 1, "autoit3dir=" & $au3folder, 1 ) ShellExecute ( @ScriptDir & "\App\SciTe\SciTe.exe", "", $workingdir ) Exit
×
×
  • Create New...