AutoHotkey Community

It is currently May 26th, 2012, 11:31 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: November 16th, 2009, 8:18 am 
Offline

Joined: July 20th, 2009, 11:27 pm
Posts: 40
This allows you to configure what the Qp and DVD buttons (the buttons on the left side of the touch sensitive buttons) launch.
Image
Image

installer
http://www.megaupload.com/?d=9UNOAWN9



Features
Quote:
-Can be used to launch any program
-works with shortcuts with arguments as well (infinite)
-works with vista (makeshrtcut.ahk must be compiled with admin launching [http://www.autohotkey.com/forum/viewtopic.php?t=22975])
-GUI
-drag and drop
-room for improvement (meaning updates in the future)



Change List
Code:
v0.5  Hard Coded with 2 programs (qp.exe dvdp.exe)

v1.0 Non gui. Manually change shortcuts to change

v1.5 non gui. used input box to change shortcuts

v2.0 Gui. type in paths to create shortcut

v2.1 Gui. DDL to select what to change (qp or dvd)

v2.2 Gui. removed DLL to read only edit boxs, drag and drop

v2.3 Gui. added ability to create each shortcut alone or at the same time without closing the gui

v2.4 Gui. added support for parameters from shortcuts

v2.5 Gui. add Make dynamic icon for program

v2.6 GUI, fixed error where it wouldnt open the shortcut

v2.7 GUI, fixed major bugs involving admin rights



Future

Code:


v2.8 ability to add parameters manually

v2.9 ?????? [post suggestions]




Bugs
Quote:
-new icon files may take a second to change
-QPDVD has a problem launching word 2007 docs
-quickplay still shows Quicklaunch (except it will launch your program) [fix in progress]
-reqires 2nd program to create the shortcut (not bug, just annoying)
-have to close the initital editor and reopen it
[/b]



Requirements.
Quote:
1.) Have the quickplay software installed
2.) Have an hp laptop with the touch sensitive buttons.



How to use.
Quote:
1.)install
2.) launch QP editor to configure the buttons



QP editor.ahk

Code:
/*
 * * * Compile_AHK SETTINGS BEGIN * * *

[AHK2EXE]
Exe_File=%In_Dir%\QP editor.exe
[VERSION]
Set_Version_Info=1
File_Version=2.7.1.7
Inc_File_Version=1
Product_Version=1.0.48.5
Set_AHK_Version=1
[ICONS]
Icon_1=%In_Dir%\QPconfigsetup.ico

* * * Compile_AHK SETTINGS END * * *
*/

;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;   Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#Singleinstance, force
GUI, add, text,, Drag and Drop a file onto the area`nThen Click the create button below the box`nTo create a new control

gui,add, Edit, readonly vleft r5 x10 y50 w90 -HScroll -VScroll, Drop Here to Edit`nQP Circle`nLeft Touch Button`n`n
gui,add, Edit, readonly vright r5 x110 y50 w90 -HScroll -VScroll,Drop Here to Edit`n QP dvd`nRight Touch Button`n`n
Gui,add,Button,x10 y150 glc,Create
Gui,add,Button,x60 y150 glcc,clear
Gui,add,Button,x110 y150 grc,Create
Gui,add,Button,x160 y150 grcc,clear
Gui,add,Button,x20 y190 gbc,Create Both
Gui,add,Button,x120 y190 gbcc,Clear Both
Gui,add,Button,x20 y230 default,Done
Gui,add,Button,x120 y230,Cancel
gui, show
return


GuiDropFiles:   
{
   gui,submit,nohide
   If (A_GuiControl = "left")
   {
      qpc=%A_GuiEvent%
      Splitpath,A_GuiEvent,,,exts ;checks if the drop is a shortcut, so arguments apply to the lauch
      If (%exts%=lnk)
         {
            FileGetShortcut,%A_GuiEvent%,icogetq,,argsc
            
            
         }
               
   }
   Else If (A_GuiControl = "right")
   {
      
      qpdvd=%A_GuiEvent%
      Splitpath,A_GuiEvent,,,extd ;checks if the drop is a shortcut, so arguments apply to the lauch
         If (%extd%=lnk)
         {
            FileGetShortcut,%A_GuiEvent%,icogetq,,argsd
         }
         
      
   }
   Else
   {
      msgbox,You missed`, try again ;so gui drops font happen in blank
   }
}
return
   
lc:
   gui,submit,nohide
   If (qpc <> "") ;checks if the varible is blank
   {
      If (argsc <> "") ;checks for aruments
      {
         Run makeshrtcut.exe "%qpc%" "nada" "%argsc%" "" "%icogetq%" ""
      }
   
      Else
      {
         
         Run makeshrtcut.exe "%qpc%" "nada" "" "" "%icogetq%"
         
      
      }   
   }
   Else
   {
      msgbox, No File Chosen`, Please drop a file onto the box ;stops you from deleting the shortcuts, or making blank ones
   }
return
lcc:
   gui,submit,nohide
   qpc:="" ;resets the variable
return

rc:
   gui,submit,nohide
   If (qpdvd <>"") ;checks if the varible is blank
   {
      If (argsd <> "") ;checks for arguments
         {
            Run makeshrtcut.exe "nada" "%qpdvd%" "" "%argsd%" "" "%icogetd%" ;makes shortcut with arguments
         }
      Else
      {
         Run makeshrtcut.exe "nada" "%qpdvd%" "" "" "" "%icogetd%" ;creats shortcut without args
         
      }
   }
   Else
   {
      msgbox, No File Chosen`, Please drop a file onto the box
   }
return
rcc:
   gui,submit,nohide
   qpdvd:="" ;clears the var
return

bc:
   If ((qpdvd <>"")&&(qpc <> "")) ;checks to makesure that both vars are not empty
   {
      Run makeshrtcut.exe "%qpc%" "%qpdvd%" "%argsc%" "%argsd%" "%icogetc%" "%icogetd%"
   }
   Else
   {
      msgbox, No Files Chosen`, Please drop a file onto the appropriate box
   }
   return

bcc:
   {
      gui,submit,nohide
      qpdvd:="" ;clears both the vars
      qpc:=""
   }
return





   
   
return


ButtonDone:
ButtonCancel:
GuiEscape:
GuiClose:
   exitapp
return



makeshrtcut.ahk

Code:
/*
 * * * Compile_AHK SETTINGS BEGIN * * *

[AHK2EXE]
Exe_File=%In_Dir%\makeshrtcut.exe
Execution_Level=4
[ICONS]
Icon_1=%In_Dir%\makeshrtcut.ico

* * * Compile_AHK SETTINGS END * * *
*/

;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;   Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


;more for programmers knowledge
qpc=%1%
qpdvd=%2%
parm1c=%3%
parm1d=%4%
icogetq=%5%
icogetd=%6%

if (qpc<>"")
{
Splitpath,qpc,,,exts ;problems with qp editor sending the arguments
      If (%exts%=lnk)
         {
            FileGetShortcut,%qpc%,icogetq,,
            qpc=%icogetq%
            
         }
}
if (qpdvd<>"")
{
Splitpath,qpdvd,,,extd ;problems with qpeditor sending the arg
      If (%extd%=lnk)
         {
            FileGetShortcut,%qpdvd%,icogetd,,
            qpdvd=%icogetd%
            
         }
}
sleep 3000
;msgbox, 1=%1%`n2=%2%`n3=%3%`n4=%4%`n5=%5%`n6=%6% ;use for testing passed parameters






If (qpc="nada")
{   
    gosub,icodvd
    gosub,icondel
   Run "%A_ScriptDir%\recompile\Compile_AHK.exe" /nogui "%A_ScriptDir%\dvdp.ahk" ;recopmpiles for dynamic icon
   FileCreateShortcut, %2%,quick2.lnk,,%4% ;creates shortcut that dvd launches
}
Else if (qpdvd="nada")
{
   gosub,icoqp ;extracts the icons from the droped file
   gosub,icondel ;deletes the excess icons created above
   Run "%A_ScriptDir%\recompile\Compile_AHK.exe" /nogui "%A_ScriptDir%\qp.ahk" ;recopmpiles for dynamic icon
   FileCreateShortcut, %1%,quick1.lnk,,%3% ;creates shortcut that QP launches
}
Else if ((qpc<>"")&&(qpdvd<>""))
{
   gosub,icoqp
   sleep 2000
   gosub,icodvd
   sleep 2000
   gosub,icondel
   Run "%A_ScriptDir%\recompile\Compile_AHK.exe" /nogui "%A_ScriptDir%\dvdp.ahk" ;recopmpiles for dynamic icon
   Run "%A_ScriptDir%\recompile\Compile_AHK.exe" /nogui "%A_ScriptDir%\qp.ahk" ;recopmpiles for dynamic icon
   FileCreateShortcut, %2%,quick2.lnk,,%4% ;creates shortcut that dvd launches
   FileCreateShortcut, %1%,quick1.lnk,,%3% ;creates shortcut that QP launches
}
Else msgbox, No params passed









icondel:
   loop,*.ico,
         {
            if (A_LoopFileName="qpc.ico")
               {
                  continue
               }
            Else If (A_LoopFileName="dvd.ico")
               {
                  Continue
               }
            Else if (A_LoopFileName="QPconfig.ico")
               {
                  continue
               }
            Else
               {
                  FileDelete,%A_LoopFileName% ;removes all the excess icons created
                }
         }
         
         
return

icoqp:
If (icogetq<>"")
         {
         p1="iconsext.exe"
         p2="%icogetq%"
         p3="%A_ScriptDir%"
         qpc=%icogetq%
         
         
         Run %p1% /save %p2% %p3% -icons,,Hide ;not working supposed to extract icons
         sleep 2000
      }
Else
      {
         p1="iconsext.exe"
         p2="%qpc%"
         p3="%A_ScriptDir%"
            Run  %p1% /save %p2% %p3% -icons,,Hide ;not working supposed to extract icons
            sleep 2000
      }
loop,*.ico,
         {
            if (A_LoopFileName="qpdvd.ico")
               {
                  continue
               }
            Else if (A_LoopFileName="QPconfig.ico")
               {
                  continue
               }
            Else
               {
                  FileMove,%A_LoopFileName%, %A_ScriptDir%\qpcicon\qpc.ico,1 ;renames the file
                  break
               }
      }
return


icodvd:
   ;FileDelete,dvdp.ico
   If (icogetd<>"")
         {
            dvdp=%icogetd%
            Run "iconsext.exe" /save "%icogetd%" "%A_ScriptDir%" -icons,, Hide
            sleep 2000
         }
   Else
         {
            Run "iconsext.exe" /save "%qpdvd%" "%A_ScriptDir%" -icons,, Hide
            sleep 2000
         }
   loop,*.ico,
         {
            if (A_LoopFileName="qpc.ico")
               {
                  continue
               }
            Else if (A_LoopFileName="QPconfig.ico")
               {
                  continue
               }
            Else
               {
                  FileMove,%A_LoopFileName%, %A_ScriptDir%\dvdpicon\dvdp.ico,1 ;renames the file
                  break
                }
         }
return



qp.ahk
Code:
/*
 * * * Compile_AHK SETTINGS BEGIN * * *

[AHK2EXE]
Exe_File=%In_Dir%\qp.exe
[ICONS]
Icon_1=%In_Dir%\qpcicon\QPC.ico

* * * Compile_AHK SETTINGS END * * *
*/

;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;   Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Run quick1.lnk


dvdp.ahk
Code:
/*
 * * * Compile_AHK SETTINGS BEGIN * * *

[AHK2EXE]
Exe_File=%In_Dir%\dvdp.exe
[ICONS]
Icon_1=%In_Dir%\dvdpicon\dvdp.ico

* * * Compile_AHK SETTINGS END * * *
*/

;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;   Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Run quick2.lnk





Special thanks to
ladiko -
http://www.autohotkey.com/forum/viewtop ... sc&start=0

Used to compile my programs and used in the dynamic icon

http://www.nirsoft.net/utils/iconsext.html

used this to extract the icons.

and whoever has helped me in the forums/IRC


Last edited by dwjp90 on November 22nd, 2009, 3:39 am, edited 13 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 12:09 pm 
Offline

Joined: July 20th, 2009, 11:27 pm
Posts: 40
v2.5 is done

changes

added comments to ahk

will upload compiled "installer" tomorrow

will upload other ahks 2morrow

dynamic compile icon


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 9:03 pm 
This seems almost too perfect to be true, I've been searching for a way to make the quick play buttons work for weeks!

I've actually installed a new hard drive into my dv6000, with windows 7, and I don't have the seperate partition containing quickplay any more.
your instructions say to have quickplay installed, but i simply want the buttons to open up WMP or iTunes or something.

Is this simply impossible without another partition containing quickplay?

Cheers,
Craig


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2009, 12:43 am 
Offline

Joined: July 20th, 2009, 11:27 pm
Posts: 40
since vista came about quickplay has been an exe and not a whole os (partition)

here ill link you to a qp installer

http://www.megaupload.com/?d=PKNX8YF3


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2009, 1:42 pm 
great! thank you!

works perfect now! the buttons launch iTunes and WMC7 :D

cheers!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2009, 1:55 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
interesting. I'll have to try this.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 12:16 am 
Offline

Joined: July 20th, 2009, 11:27 pm
Posts: 40
Installer almost done (needs 64bit testing)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 21st, 2009, 7:30 am 
Offline

Joined: July 20th, 2009, 11:27 pm
Posts: 40
installer is done.

(unknown 64bit compatibility)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 24th, 2010, 12:38 am 
Offline

Joined: July 20th, 2009, 11:27 pm
Posts: 40
its compatible with 64bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 10th, 2010, 4:18 pm 
Can some1 please explain how it works....
i downloaded it and stuff but im lost...all i want to do is make the play/pause fast foward, stop, etc buttons work on itune not windows media player


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 11th, 2010, 3:01 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
Hey thats cool. I own a hp laptop and will gonna never look a dvd on that. Ill try that.

_________________
{1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <--


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group