AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Quick Play config (hp laptops) V2.7

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
dwjp90



Joined: 20 Jul 2009
Posts: 40

PostPosted: Mon Nov 16, 2009 7:18 am    Post subject: Quick Play config (hp laptops) V2.7 Reply with quote

This allows you to configure what the Qp and DVD buttons (the buttons on the left side of the touch sensitive buttons) launch.



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/viewtopic.php?t=22975&postdays=0&postorder=asc&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 Sun Nov 22, 2009 2:39 am; edited 13 times in total
Back to top
View user's profile Send private message AIM Address
dwjp90



Joined: 20 Jul 2009
Posts: 40

PostPosted: Wed Nov 18, 2009 11:09 am    Post subject: Reply with quote

v2.5 is done

changes

added comments to ahk

will upload compiled "installer" tomorrow

will upload other ahks 2morrow

dynamic compile icon
Back to top
View user's profile Send private message AIM Address
craigpeake
Guest





PostPosted: Wed Nov 18, 2009 8:03 pm    Post subject: Reply with quote

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
Back to top
dwjp90



Joined: 20 Jul 2009
Posts: 40

PostPosted: Wed Nov 18, 2009 11:43 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message AIM Address
craigpeake
Guest





PostPosted: Thu Nov 19, 2009 12:42 pm    Post subject: Reply with quote

great! thank you!

works perfect now! the buttons launch iTunes and WMC7 Very Happy

cheers!
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Thu Nov 19, 2009 12:55 pm    Post subject: Reply with quote

interesting. I'll have to try this.
_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
dwjp90



Joined: 20 Jul 2009
Posts: 40

PostPosted: Thu Nov 19, 2009 11:16 pm    Post subject: Reply with quote

Installer almost done (needs 64bit testing)
Back to top
View user's profile Send private message AIM Address
dwjp90



Joined: 20 Jul 2009
Posts: 40

PostPosted: Sat Nov 21, 2009 6:30 am    Post subject: Reply with quote

installer is done.

(unknown 64bit compatibility)
Back to top
View user's profile Send private message AIM Address
dwjp90



Joined: 20 Jul 2009
Posts: 40

PostPosted: Sat Jan 23, 2010 11:38 pm    Post subject: Reply with quote

its compatible with 64bit
Back to top
View user's profile Send private message AIM Address
ANTH
Guest





PostPosted: Sat Apr 10, 2010 3:18 pm    Post subject: Reply with quote

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
Back to top
Tuncay



Joined: 07 Nov 2006
Posts: 1886
Location: Germany

PostPosted: Sun Apr 11, 2010 2:01 pm    Post subject: Reply with quote

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! <--
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group