topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday April 19, 2024, 8:38 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA:start program in low priority  (Read 5067 times)

nite_monkey

  • Member
  • Joined in 2006
  • **
  • Posts: 753
    • View Profile
    • Just Plain Super
    • Read more about this member.
    • Donate to Member
IDEA:start program in low priority
« on: June 20, 2007, 10:28 AM »
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
[Insert really cool signature here]
« Last Edit: June 20, 2007, 04:41 PM by nite_monkey »

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA:start program in low priority
« Reply #1 on: June 20, 2007, 04:48 PM »
 :) 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

  • Member
  • Joined in 2006
  • **
  • Posts: 753
    • View Profile
    • Just Plain Super
    • Read more about this member.
    • Donate to Member
Re: IDEA:start program in low priority
« Reply #2 on: June 21, 2007, 04:28 AM »
 :D Thanks, that is exactly what I wanted.  :Thmbsup:
[Insert really cool signature here]