ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA:start program in low priority

(1/1)

nite_monkey:
Ok, this should be an easy build, all you need to code it is autohotkey, but I am not good with autohotkey, so I need someone else to code it for me. Please and thank you.

I am trying to make a script that will make desktop shortcuts with custom settings.
I want an autohotkey script that when you open it, a dialog window will pop up and you type in what you want the window title to be.
then, another dialog box will pop up, and you type in the location to the program.
The script would then make a shortcut on the desktop that would look like this:

C:\WINDOWS\system32\cmd.exe /c start "text from window title dialog box" /low "text from program location dialog box"

so an example output would be:
~Window title Dialog Box~
Input:Adobe Photoshop

~Program location Dialog Box~
Input:C:\Program Files\Adobe\Photoshop 6.0\Photoshp.exe

then a shortcut would be put on the desktop, and in the target box, the following would be added:
C:\WINDOWS\system32\cmd.exe /c start "Adobe Photoshop" /low "C:\Program Files\Adobe\Photoshop 6.0\Photoshp.exe"

I don't need this part, but if you want to, you can add a third box where you can add commands like -window

skrommel:
 :) Try this script!

Save it as LowShortcut.ahk, and download and install Autohotkey.

Skrommel


--- ---;LowShortcut.ahk
; Autocreate low priority shortcuts by dropping files or shortcuts on the icon
; Run it to manually input a window title and a program location
;Skrommel @ 2007

If 0=0
{
  InputBox,linkfile,~Window title Dialog Box~,Please enter a window title:
  InputBox,target,~Program location Dialog Box~,Please enter a program location:
  FileCreateShortcut,%comspec%,%linkfile% - low.lnk,,/c start "%linkfile%" /low "%target%",,%target%,,,
}
Else
Loop,%0%
{
  drop:=%A_Index%
  Loop,%drop%
    longfilename:=A_LoopFileLongPath
  SplitPath,longfilename,filename,dir,ext,namenoext,drive
  If ext<>LNK
    FileCreateShortcut,%comspec%,%namenoext% - low.lnk,,/c start "%filename%" /low "%longfilename%",,%longfilename%,,,
  Else
  {
    FileGetShortcut,%longfilename%,target,dir,args,description,icon,iconnum,runstate
    FileCreateShortcut,%comspec%,%namenoext% - low.lnk,%dir%,/c start "%namenoext%" /low "%target%",%description%,%target%,%icon%,%iconnum%,
  }
}

nite_monkey:
 :D Thanks, that is exactly what I wanted.  :Thmbsup:

Navigation

[0] Message Index

Go to full version