heres what im working on at the moment, a Frontend that will eventually play DJ and Karaoke using Plugins for as many karaoke players that i can lay my hands on. it has some stuff working like Numpad del key and then immediately any numpad number from 0-9 for sound effects etc.... and some setup code and my version of tooltip without the tip...
what was happening was i was resizing windows and then switching between kj and dj mode and it lost all the positions but not the size after resizing.
you will see my code remedy in the hidekaraoke and hidedj routines.
Code:
#Include Anchor.ahk
;----------------------------------------------------------
; @@@@@@ @ @@@ ;
; @@ @@ @@ ;
; @@ @@ @@@ @@@@ @@@@@ @@@@@ @@@@ @@@@@ @@ ;
; @@@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@ ;
; @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ ;
; @@ @@@@ @@@@ @@ @@ @@ @@@@ @@ @@ @@@ @@ ;
;----------------------------------------------------------;
;tag
;Frontend:
; Language: English
; Platform: Win9x/NT
; Author: T. Gowshall <trubbleguy@optusnet.com.au>
/*
********** Settings, Variable Declarations **********
*/
#SingleInstance Force
#NoEnv
SendMode Input
programName = Universal Karaoke Frontend ; DEBUG: to do
programVersion = V2.001 ; DEBUG: to do
programFullName = %programName% %programVersion%
programAuthor = Trubbleguy ; DEBUG: to do
Guinum=8
#Persistent
windows=3%A_Tab%gui3,4%A_Tab%gui4,5%A_Tab%gui5,6%A_Tab%gui6,7%A_Tab%gui7,8%A_Tab%gui8
SetTimer Caps, 1000
SetTitleMatchMode,3
_ini=%A_ScriptDir%\settings.ini
StringCaseSense,Off
_activemode=karaoke
;-------------------------------------------------------------------------------------------------
; @@@@ @ @@@@ @@ ;
; @@ @@ @@ @@ @@ ;
;@@ @@@@ @@@@@ @@@ @@@@ @@ @@@ @@@@ @@@@ @@@@@ @@@@@ @@@ @@@@@@ @@@@ ;
;@@ @@ @@ @@ @@@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@ @@ ;
;@@ @@@ @@@@@@ @@ @@@ @@ @@ @@ @@@@@@ @@@@@@ @@ @@ @@@@ @@ @@ @@@@@@ ;
; @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ ;
; @@@@@ @@@@ @@ @@@@ @@@@ @@@@ @@@@ @@@@ @@ @@ @@@@@ @@@@ @@@@@@ @@@@ ;
;-------------------------------------------------------------------------------------------------;
;tag
;Screensize:
SysGet, MWA, MonitorWorkArea,1
_swidth:=MWARight-20
_mid := MWABottom /2
_splashbot := MWABottom - 37
_x:=(A_ScreenWidth-789)/2
_y:=(A_ScreenHeight-521)/2
_swidth:=(_swidth/2)+65
Gosub readini
vkey=`n%programFullName%`nBy %programAuthor%
GoSub, getParams
GoSub, trayMenu
Gosub buttoninfo
;-------------------------------
; @@@@ @@ @@ ;
; @@ @@ @@@ ;
;@@ @@ @@ @@@ @@ ;
;@@ @@ @@ @@ @@ ;
;@@ @@@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ ;
; @@@@@ @@@ @@ @@@@ @@@@@@ ;
;-------------------------------;
;tag
Gui1:
DllCall("QueryPerformanceFrequency", "Int64P", freq)
If Resized=1
Vkey=Resize and Move Complete
Gui, 1:Add, Edit, vedit1 x330 y80 R2 w260,
Gui, 1:Add, Button,vf1 x10 y2 w50 h20 gtogglemode,F1
Gui, 1:Add, Button,vf2 xp+52 yp wp hp,F2
Gui, 1:Add, Button,vf3 xp+52 yp wp hp,F3
Gui, 1:Add, Button,vf4 xp+52 yp wp hp,F4
Gui, 1:Add, Button,vf5 xp+52 yp wp hp,F5
Gui, 1:Add, Button,vf6 xp+52 yp wp hp,F6
Gui, 1:Add, Button,vf7 xp+55 yp wp hp,F7
Gui, 1:Add, Button,vf8 xp+54 yp wp hp,F8
Gui, 1:Add, Button,vf9 xp+54 yp wp hp,F9
Gui, 1:Add, Button,vf10 xp+54 yp wp hp,F10
Gui, 1:Add, Button,vf11 xp+54 yp wp hp,F11
Gui, 1:Add, Button,vf12 xp+54 yp wp hp,F12
Gui, 1:Add, Button,vsearch x10 y24 w50 h23 gsearch,Search
Gui, 1:Add, Button,vplayit xp+52 yp wp hp,Playit
Gui, 1:Add, Button,vopen xp+52 yp wp hp,Open
Gui, 1:Add, Button,vstop xp+52 yp wp hp,Stop
Gui, 1:Add, Button,vplay xp+52 yp wp hp,Play
Gui, 1:Add, Button,vsfx xp+52 yp wp hp gsfxapplause,SFX
Gui, 1:Add, Edit,vedit x10 y50 l1 w154,
Gui, 1:Add, Button,vfavorite x166 y50 w50 h23,Favorite
Gui, 1:Add, Button,vrescan xp+52 yp wp hp,ReScan
Gui, 1:Add, Button,vbutton xp+52 yp wp hp,Button
Gui, 1:Add, Button,vsetup x596 y29 w50 h23 Center gsetup,Setup
Gui, 1:Add, Button,vexit xp yp+29 wp hp Center gExit,EXIT
;------------------------------------------------------------
; @@@@ @@ @@@@ @ ;
; @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@@ @@@ @@@@ @@@@@ @@ @@ @@ @@@ ;
;@@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@@ @@ @@ @@ @@@ @@@@@@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@ @@@@@ ;
; @@@@@ @@@ @@ @@@@ @@@@ @@@@ @@ @@@ @@ @@ ;
;----------------------------------------------------@@@-----;
;tag
Gui2:
Gui, 2:Add, Button, x500 y300 w130 h30 Center gclosesetup,Save and Exit
Gui, 2:Add, Button, x20 y20 w120 h20 Center ,Set Database file
Gui, 2:Add, Button, xp yp+25 wp hp Center ,Set Database folder
Gui, 2:Add, Button, xp yp+25 wp hp Center ,Set Karaoke folder
Gui, 2:Add, Button, xp yp+25 wp hp Center ,Set Dj Folder
Gui, 2:Add, Button, xp yp+25 wp hp Center ,Set Player Plugin
Gui, 2:Add, Button, xp yp+25 wp hp Center ,Set Winrar folder
Gui, 2:Add, Button, xp yp+25 wp hp Center ,Set some other folder
Gui, 2:Add, Button, xp yp+25 wp hp Center ,Set some other folder
Gui, 2:Add, Button, xp yp+25 wp hp Center ,Set some other folder
Gui, 2:Add, Text,x160 y25 w350 h20,this is a huge text to display in the middle of the damn setup box
Gui, 2:Add, Text,xp yp+25 wp hp,this is a huge text to display in the middle of the damn setup box
Gui, 2:Add, Text,xp yp+25 wp hp,this is a huge text to display in the middle of the damn setup box
Gui, 2:Add, Text,xp yp+25 wp hp,this is a huge text to display in the middle of the damn setup box
Gui, 2:Add, Text,xp yp+25 wp hp,this is a huge text to display in the middle of the damn setup box
Gui, 2:Add, Text,xp yp+25 wp hp,this is a huge text to display in the middle of the damn setup box
Gui, 2:Add, Text,xp yp+25 wp hp,this is a huge text to display in the middle of the damn setup box
Gui, 2:Add, Text,xp yp+25 wp hp,this is a huge text to display in the middle of the damn setup box
Gui, 2:Add, Text,xp yp+25 wp hp,this is a huge text to display in the middle of the damn setup box
Gui, 2:Add, CheckBox, x500 y20 w150 h30,Winrar Used
Gui, 2:Add, CheckBox, xp yp+25 wp hp,Database Used
Gui, 2:Add, CheckBox, xp yp+25 wp hp,Dj Mode Used
Gui, 2:Add, CheckBox, xp yp+25 wp hp,Favorites used
Gui, 2:Add, CheckBox, xp yp+25 wp hp,Rotatation Used
Gui, 2:Add, CheckBox, xp yp+25 wp hp,Dj Playlist Used
Gui, 2:Add, CheckBox, xp yp+30 wp hp gTooltiponoff Checked%_tt%,Visual Help Enable`n(Mouse Over Controls)
Gui, 2:Add, CheckBox, xp yp+30 wp hp ghidemode1 Checked%_hm%,Hide Unused Mode`n(Less Screen Used.)
;-------------------------------
; @@@@ @@ @@@@ ;
; @@ @@ @@ @@ ;
;@@ @@ @@ @@@ @@ ;
;@@ @@ @@ @@ @@@ ;
;@@ @@@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ ;
; @@@@@ @@@ @@ @@@@ @@@@ ;
;-------------------------------;
Gui3:
gui, 3:+owner1
Gui, 3: +Resize
Gui, 3:Add, ListView, vlist3 %_ab3% ,3| | | |
;--------------------------------
; @@@@ @@ @@@ ;
; @@ @@ @@@@ ;
;@@ @@ @@ @@@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ ;
;@@ @@@ @@ @@ @@ @@@@@@@ ;
; @@ @@ @@ @@ @@ @@ ;
; @@@@@ @@@ @@ @@@@ @@@@ ;
;--------------------------------;
;tag
Gui4:
gui, 4:+owner1
Gui, 4: +Resize
Gui, 4:Add, ListView,vlist4 %_ab4% ,4| | | |
;-------------------------------
; @@@@ @@ @@@@@@ ;
; @@ @@ @@ ;
;@@ @@ @@ @@@ @@@@@ ;
;@@ @@ @@ @@ @@ ;
;@@ @@@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ ;
; @@@@@ @@@ @@ @@@@ @@@@ ;
;-------------------------------;
Gui5:
gui, 5:+owner1
Gui, 5: +Resize
Gui, 5:Add, ListView,vlist5 %_ab5% ,5| | | |
;-------------------------------
; @@@@ @@ @@@ ;
; @@ @@ @@ ;
;@@ @@ @@ @@@ @@ ;
;@@ @@ @@ @@ @@@@@ ;
;@@ @@@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ ;
; @@@@@ @@@ @@ @@@@ @@@@ ;
;-------------------------------;
;tag
Gui6:
gui, 6:+owner1
Gui, 6: +Resize
Gui, 6:Add, ListView,vlist6 %_ab6% ,6| | | |
;----------------------------
; @@@@ @@ @@@@@@ ;
; @@ @@ @@ @@ ;
;@@ @@ @@ @@@ @@ ;
;@@ @@ @@ @@ @@ ;
;@@ @@@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ ;
; @@@@@ @@@ @@ @@@@ @@ ;
;----------------------------;
Gui7:
gui, 7:+owner1
Gui, 7: +Resize
Gui, 7:Add, ListView,vlist7 %_ab7% ,7| | | |
;----------------------------
; @@@@ @@ @@@@ ;
; @@ @@ @@ @@ ;
;@@ @@ @@ @@@ @@ @@ ;
;@@ @@ @@ @@ @@@@ ;
;@@ @@@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ ;
; @@@@@ @@@ @@ @@@@ @@@@ ;
;----------------------------;
;tag
Gui8:
gui, 8:+owner1
Gui, 8: +Resize
Gui, 8:Add, ListView,vlist8 %_ab8% ,8| | | |
;------------------------------------------------------
; @@@@ @@ @@@@ @@@ ;
; @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@@ @@@ @@ @@ @@@@ @@ @@ ;
;@@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@ @ @@ ;
;@@ @@@ @@ @@ @@ @@@ @@ @@ @@ @@ @@@@@@@ ;
; @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@@ ;
; @@@@@ @@@ @@ @@@@ @@@@ @@@ @@ @@@@ @@ @@ ;
;------------------------------------------------------;
;tag
;Gui Show:
Gui, 1:Show, x%ax1% y%ay1% , Main ;h%ah1%
;WinSet, ALwaysOnTop,On,Main
WinGetPos,GX,GY,GW,GH,Main
_spx:=(GX+330)
_spy:=(GY+47)
Progress,x%_spx% Y%_spy% zh0 zy1 w264 H56 B c6 CW333333 CT000000 fs11,%vkey%,,Status
WinSet, TransColor,333333,Status
WinMove,Status,%vkey%,%_spx%,%_spy%
Gui, 3:Show, x%ax3% y%ay3% , Karaoke Search
Gui, 4:Show, x%ax4% y%ay4% , Rotation
Gui, 5:Show, x%ax5% y%ay5% , Kj Favorites
Gui, 6:Show, x%ax6% y%ay6% , Dj Search
Gui, 7:Show, x%ax7% y%ay7% , Dj Playlist
Gui, 8:Show, x%ax8% y%ay8% , Dj Favorites
Gui, 3:+Resize -MaximizeBox
Gui, 4:+Resize -MaximizeBox
Gui, 5:+Resize -MaximizeBox
Gui, 5:+Resize -MaximizeBox
Gui, 7:+Resize -MaximizeBox
Gui, 8:+Resize -MaximizeBox
Gosub hidemode
Gosub filler
ControlFocus,Edit1,Main
;----------------------------------------------------
;@@ @@ @ @@@ ;
;@@ @@ @@ @@ ;
;@@ @@ @@@@ @@@@@ @@ @@ @@@@ @@ @@ @@@@@ ;
;@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@@@ @@@@@@ @@ @@ @@@@ ;
;@@ @@ @@ @@ @@ @ @@ @@ @@ @@@@@ @@ ;
;@@ @@ @@@@ @@ @@@ @@ @@@@ @@ @@@@@ ;
;---------------------------------------@@@@---------;
;tag
;Hot keys:
#IfWinActive Main
F1::Gosub togglemode
#IfWinActive
`::Gosub Search
NumpadDot::gosub sfx
!ESC::
Suspend ; exempt from suspension -- DEBUG: optional
GoSub, quit
Return
Return
;###############################################
l2:
l3:
return
;----------------------------------
; @@@@ @@ ;
;@@ @@ ;
;@@@ @@@ @@@@@@ @@@@ @@ @@@ ;
; @@@ @@ @ @@ @@ @@ @@@ @@ ;
; @@@ @@ @@ @@@@@@ @@ @@ ;
;@@ @@ @@ @@ @ @@ @@ ;
; @@@@ @@@@ @@@@@@ @@@@ @@@@ ;
;----------------------------------;
;tag
;Sizer:
sizer:
normspeed:=A_Batchlines
SetBatchLines,-1
loop %Guinum%
z%A_Index%=
loop,Parse,wind,^,%A_Space%
{
StringSplit,z,A_Loopfield,%A_Tab%,%A_Space%
zgui:=z1
Gui,%z1%:Show
; WinActivate,%z2%
WinGetPos,GX,GY,GW,GH,%z2%
If GX =""
MsgBox Variable not found for %z2%
GH:=(GH-20)
GW:=(GW-8)
If zgui between 2 and 99
{
IniWrite,%GW% %GH% %z2%,%_ini%,%zgui%,gui
IniWrite,%GX% %GY% %z2%,%_ini%,%zgui%,loc
; WinMove,%z2%,,%GX%,%GY%
}
If zgui=1
{
IniWrite,634 75 %z2%,%_ini%,1,gui
IniWrite,%GX% %GY% %z2%,%_ini%,1,loc
}
}
SetBatchLines,%normspeed%
Return
;-------------------------------------
; @@@ @@ @@@ @@@ ;
; @@ @@ @@ @@ ;
; @@ @@@ @@ @@ @@@@ @@ @@@ ;
;@@@@ @@ @@ @@ @@ @@ @@@ @@ ;
; @@ @@ @@ @@ @@@@@@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ ;
;@@@@ @@@@ @@@@ @@@@ @@@@ @@@@ ;
;-------------------------------------;
;tag
filler:
loop,Parse,windows,`,,%A_Space%
{
StringSplit,z,A_Loopfield,%A_Tab%,%A_Space%
Gui,%z1%:Default
Gui,Listview
loop 20
LV_Add("",A_Index,"got to put lots of words","or add lots of words","ansome lots more words with stuff too")
LV_ModifyCol()
LV_ModifyCol(1, "Integer")
LV_ModifyCol(1,"sort")
}
return
;--------------------------------------------------------------------
;@@@@@@ @ @ @@@@ @@@ ;
; @@ @@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@@@@ @@@@@ @@@@ @@@@@ @@ @@@@@ @@ @@@@ ;
; @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @ @@ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@@@@@ @@@ @@ @@ @@ @@@@ @@ @@ @@@@ @@ @@ @@@@ @@@@ ;
;--------------------------------------------------------------------;
;tag
;ButtonInfo:
buttoninfo:
;define the tooltips for the Control here, the number 1 is for Gui1:
;If the Control has spaces in the name eg. word1 word2,
;make the variable word1word2 without spaces
;all spaces in the Controls name are removed for the variable,
Loop %Guinum% ;common buttons per gui
{
TT_%A_Index%_A=
}
TT_1_ReScan=`nClick here to Udate your song`nDatabase with Newly added songs
TT_1_Setup=`nClick here to display Setup screen
TT_1_F1=KARAOKE / DJ Toggle`nToggles between Modes`nHides NoN Active Mode
TT_1_F2=`nRotation window
TT_1_F3=`nStart Recording`nthrough LINE IN
TT_1_F4=`nStop Recording
TT_1_F5=`nPlay Back Recording
TT_1_F6=`nLeft Multiplex Channel
TT_1_F7=`nStereo (normal) Channel
TT_1_F8=`nRight Multiplex Channel
TT_1_F9=`nDown a Key
TT_1_F10=`nReset ALL`nKey Changes
TT_1_F11=`nUp a key
TT_1_F12=`nToggle singer screen monitor
TT_1_Search=Use Tilde key ( ~ )`nFor a new Search`nOn Whichever Mode is Active
TT_1_Stop=`nUse Numpad key`nMinus ( - )
TT_1_play=`nUse Numpad key`nPlus ( + )
TT_1_Open=`nUse Numpad key`nStar ( * )
TT_1_PlayIt=`nUse Either`nEnter Key
TT_1_Favorite=Use Numpad ( / ) to Show Peoples`nFavorites list, & Press first letter of name`nThen hit enter, Select song & Press enter
TT_1_SFX=Use Numpads Del key`nThen tap 0 to 9 multiple times`nfor multiple effects
TT_2_VisualHelpEnableMouseOverControls=`nShows help in the MAIN window`nRight where you see this now.
TT_2_HideUnusedModeLessScreenUsed=Shows only the USED windows`nEither Karaoke windows or DJ Windows.`nF1 Switches Between modes still.
TT_7_Saveandexit=saves settings and exits
Return
;----------------------------------------------------------------------------------
; @@@@ @@ @@@ ;
; @@ @@ @@ @@ ;
;@@ @@@@ @@ @@@ @@@@@ @@ @@@@ @@@@ @@ @@ @@@@ @@@@@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@@@@ @@ @@ @@@@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
; @@@@ @@@ @@ @@ @@@@@ @@@@@@ @@@@ @@@@ @@@ @@ @@@@ @@ @@ ;
;----------------@@@---------------------------------------------------------------;
;tag
;Caps Lock on:
Caps:
If GetKeyState("CapsLock","T")
SoundBeep, 2200,15
; SoundPlay, C:\WINDOWS\MEDIA\Windows XP Pop-up Blocked.wav
Return
;-------------------------------------------------
;@@@@@@ @@@ @@@@ @@ @@ @@@@ ;
; @@ @@ @@ @@ @@@ @@ @@ ;
; @@ @@ @@@@ @@@@ @@ @@ @@@@ @@ @@ ;
; @@@@@ @@ @@ @@ @@@@@ @@ @@ @@@@ @@ ;
; @@ @@ @@@@@@ @@@@@ @@ @@ @@ @@ @@@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@@ @@ @@@@ @@@ @@ @@@ @@ @@@@ @@ @@ @@@@ ;
;-------------------------------------------------;
;tag
;INIRead 1;
readini:
xr1=200
xr2=200
Iniread,test,%_ini%,1,gui
if test=ERROR
{
loop %Guinum%
{
xr1:=(xr1+20)
xr2:=(xr2+20)
IniWrite,%xr1% %xr2% %z2%,%_ini%,%A_Index%,loc
}
loop %Guinum%
{
IniWrite,190 190 %z2%,%_ini%,%A_Index%,gui
}
IniWrite,634 75 Main,%_ini%,1,gui
IniWrite,634 250 Setup,%_ini%,2,gui
Iniwrite,1,%_ini%,ON-OFF,MOUSEOVER
MsgBox,0,,INI FILE CREATED OR MODIFIED,5
Reload
}
;This bit loops the GUI vars
Loop %Guinum%
{
_x%A_Index%x=
_y%A_Index%x=
_ab%A_Index%=
_ac%A_Index%=
x%A_Index%=
y%A_Index%=
}
Loop %Guinum%
{
Iniread,_a%A_Index%,%_ini%,%A_Index%,loc
Iniread,_b%A_Index%,%_ini%,%A_Index%,gui
}
Loop %Guinum%
{
StringSplit,_x%A_Index%x,_a%A_Index%,%A_Space%,%A_Space%
x1:=_x%A_Index%x1
x2:=_x%A_Index%x2
StringSplit,_y%A_Index%x,_b%A_Index%,%A_Space%,%A_Space%
x3:=_y%A_Index%x1
x4:=_y%A_Index%x2
if x3<50
x1=100
if x4<50
x2=100
if x3<50
x3=100
if x4<50
x4=100
rs%A_Index%x:=x3
rs%A_Index%y:=x4
ax%A_Index%:=x1
ay%A_Index%:=x2
aw%A_Index%:=x3
ah%A_Index%:=x4
_spx:=_x1x1
_spy:=_x1x2
y3:=x3-20
y4:=Round(x4/15)-2
_ab%A_Index%=R%y4% W%y3% ;
}
;--------------------------------------------------------
;@@@@@@ @@@ @@@@ @@ @@ @@@@ @@@@ ;
; @@ @@ @@ @@ @@@ @@ @@ @@ @@ ;
; @@ @@ @@@@ @@@@ @@ @@ @@@@ @@ @@ @@ ;
; @@@@@ @@ @@ @@ @@@@@ @@ @@ @@@@ @@ @@@ ;
; @@ @@ @@@@@@ @@@@@ @@ @@ @@ @@ @@@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@@ @@ @@@@ @@@ @@ @@@ @@ @@@@ @@ @@ @@@@ @@@@@@ ;
;--------------------------------------------------------;
;tag
;INIRead 2:
;the other ini options
Iniread,_tt,%_ini%,ON-OFF,MOUSEOVER
if _tt=1
OnMessage(0x200,"MOUSEOVER")
Iniread,_hm,%_ini%,ON-OFF,hidemode
Return
;-------------------------------------------------------------------
;@@ @@ @@@ ;
;@@@ @@@ @@ @@ ;
;@@@@@@@ @@@@ @@ @@ @@@@@ @@@@ @@ @@ @@ @@ @@@@ @@ @@@ ;
;@@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ ;
;@@ @ @@ @@ @@ @@ @@ @@@@ @@@@@@ @@ @@ @@ @@ @@@@@@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@ ;
;@@ @@ @@@@ @@@ @@ @@@@@ @@@@ @@@ @@ @@@@ @@@@ ;
;-------------------------------------------------------------------;
;tag
;MouseOver:
MOUSEOVER()
{
If A_Gui=<0 ;check if mouse is not on any gui
{
SetTimer,cls,-250
Vkey:=
ControlSetText,,%vkey%,Status
Return
}
{
SetTimer cls,8000
MouseGetPos, X,Y,,, ;get the mouse co-ordinates
_tword=%A_GuiControl% ;make A_GuiControl a modifyable variable
StringReplace,_tword,_tword,%A_Space%,,all ;remove the spaces so it can find the tooltip
StringReplace,_tword,_tword,~,,all ;remove ~
StringReplace,_tword,_tword,+,,all ;remove +
StringReplace,_tword,_tword,*,,all ;remove *
StringReplace,_tword,_tword,/,,all ;remove /
StringReplace,_tword,_tword,(,,all ;remove (
StringReplace,_tword,_tword,),,all ;remove )
StringReplace,_tword,_tword,-,,all ;remove -
StringReplace,_tword,_tword,:,,all ;remove :
StringReplace,_tword,_tword,\,,all ;remove \
StringReplace,_tword,_tword,.,,all ;remove .
StringReplace,_tword,_tword,`n,,all ;remove any line returns
_tip:=TT_%A_Gui%_%_tword% ;get the tooltip to display
C_Gui:=A_Gui
; Tooltip ;%_tip%,%X%,%Y% ;display it
Vkey:=TT_%A_Gui%_%_tword%
WinGetPos,GX,GY,GW,GH,Main
_spx:=(GX+330)
_spy:=(GY+47)
ControlSetText,,%vkey%,Status
WinMove,Status,%vkey%,%_spx%,%_spy%
}
}
Return
;-----------------------------------------------------------
;@@@ @ @@ @@@ @ @@@@ @@@@ @@ @@ @@ ;
;@ @ @ @@@ @ @ @ @@ @@ @@ @@ @@ @@ @@ ;
;@@@ @ @@ @@@ @ @@ @@ @@ @@ @@ ;
; @ @@ @ @@@ @@ @@ @@ @@ ;
; @ @@@ @@ @ @@@ @@ @@ @@ @@ @@ ;
; @ @ @ @@ @ @ @ @@ @@ @@ @@ @@ @@@@ ;
;@ @@@ @@@@@@ @ @@@ @@@@@@ @@@@ @@@@@@ @@ ;
;-----------------------------------------------------------;
;tag
;CL Params:
; process command line parameters -- DEBUG: optional (see above)
getParams:
If 0 > 0
{
Loop, %0% ; for each parameter
{
param := %A_Index%
; check for switches
StringLeft, paramType, param, 1
If paramType = - ; switch indicator
{
; determine type of switch
StringMid, switch, param, 2, 1
; switch
If switch = x ; DEBUG: template (replace "x")
{
; access value (= next parameter)
param = % A_Index + 1
var_x := %param% ; DEBUG: template (replace "var_x")
}
}
}
}
Return
;------------------------------------------------------------
;@@@@@@ @@ @@ ;
; @@ @@@ @@@ ;
; @@ @@ @@@ @@@@ @@ @@ @@@@@@@ @@@@ @@@@@ @@ @@ ;
; @@ @@@ @@ @@ @@ @@ @@@@@@@ @@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@@@@ @@ @@ @@ @ @@ @@@@@@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ @@ ;
; @@ @@@@ @@@ @@ @@ @@ @@ @@@@ @@ @@ @@@ @@ ;
;------------------------@@@@--------------------------------;
;tag
;TrayMenu:
trayMenu:
; set tray tip
Menu, Tray, Tip, %programFullName%
; disable standard menu items
Menu, Tray, NoStandard
; show info message
Menu, Tray, Add, &About, about
; separator
Menu, Tray, Add
; show Setup message
Menu, Tray, Add, &Setup, setup
; separator
Menu, Tray, Add
; terminate script
Menu, Tray, Add, &Quit, quit
Return
;-------------------------------------------------------------------------
; @@@@ @@@ @@@@ @ ;
; @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@@@ @@@@@ @@@@ @@@ @@@@ @@@@@ @@ @@ @@ @@@ ;
;@@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@@@ @@@@@@ @@@ @@@@@@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@ @@@@@ ;
; @@@@ @@@@ @@@@ @@@@@ @@@@ @@@@ @@@@ @@ @@@ @@ @@ ;
;-----------------------------------------------------------------@@@-----;
;tag
;Setup close:
closesetup:
Gui, 2:Submit
ControlSetText,,%vkey%,Status
WinSet,Redraw,,Status
vkey=Close Setup
gosub history
ControlFocus,Edit2,Main
Return
;---------------------------------------------------------------------
; @@@@ @@@ @@@@ @ ;
;@@ @@ @@ @@ @@ @@ ;
;@@@ @@ @@ @@@@ @@ @@ @@@ @@@@ @@@@@ @@ @@ @@ @@@ ;
; @@@ @@@ @@ @@ @@ @@ @ @@ @@@ @@ @@ @@ @@ @@ @@ @@ ;
; @@@ @@ @@ @@ @@ @@@@@@@ @@@ @@@@@@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@ @ @@ @@ @@@@@ ;
; @@@@ @@@ @@ @@@@ @@ @@ @@@@ @@@@ @@ @@@ @@ @@ ;
;-------------------------------------------------------------@@@-----;
;tag
;Setup show:
setup:
IfWinExist,Setup
{
Gosub closesetup
Return
}
Gui, 2:Show,xCenter yCenter,Setup
vkey=Activate Setup
gosub history
Return
;-------------------------------------
; @@ @@@ @ ;
; @@@@ @@ @@ ;
;@@ @@ @@ @@@@ @@ @@ @@@@@ ;
;@@ @@ @@@@@ @@ @@ @@ @@ @@ ;
;@@@@@@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @ ;
;@@ @@ @@ @@@ @@@@ @@@ @@ @@ ;
;-------------------------------------;
;tag
;About:
about:
MsgBox, 64, %programFullName%,
( LTrim
%programFullName%
%A_Space%by %programAuthor%
Professional Universal Karaoke Front end
http://trubbleguy.com
Use [ALT]+[ESC] to terminate the program.
)
Return
;---------------------------
; @@@@ @@ @ ;
;@@ @@ @@ ;
;@@ @@ @@ @@ @@@ @@@@@ ;
;@@ @@ @@ @@ @@ @@ ;
;@@ @@@ @@ @@ @@ @@ ;
; @@@@ @@ @@ @@ @@ @ ;
; @@@ @@@ @@ @@@@ @@ ;
;---------------------------;
;tag
;Quit:
exit:
quit:
GuiClose:
wind=1%A_Tab%Main^3%A_Tab%Karaoke Search^4%A_Tab%Rotation^5%A_Tab%Kj Favorites^6%A_Tab%Dj Search^7%A_Tab%Dj Playlist^8%A_Tab%Dj Favorites
Gosub sizer
ExitApp
;-------------------------------------------
; @@@@ @@@ @@@ ;
;@@ @@ @@ @@ ;
;@@@ @@ @@@ @@ @@@@ @@@@@ @@ @@ ;
; @@@ @@ @@ @@ @@ @@ @@@ @@ ;
; @@@ @@ @@ @@ @@@@@ @@@@ @@ @@ ;
;@@ @@ @@@@@ @@ @@ @@ @@ @@ @@ ;
; @@@@ @@ @@@@ @@@ @@ @@@@@ @@@ @@ ;
;-------@@@---------------------------------;
;tag
;Splash:
splash:
IfWinExist,Status
{
SetTitleMatchMode 2
ControlSetText,,%vkey%,Status
WinSet,Redraw,,Status
}
Else
{
Progress,y17 zh0 zy1 B c10 CWdefault CT010000 fs10,%vkey%,%A_Index%,Status
WinMove,Status,%vkey%,1,1
}
Return
;-----------------------
; @@@@ @@@@@@ @@ ;
;@@ @@ @@ @@ @@ ;
;@@@ @@ @@ @@ ;
; @@@ @@@@@ @@ ;
; @@@ @@ @@ ;
;@@ @@ @@ @@ ;
; @@@@ @@@@ @@@@@@ ;
;-----------------------;
;tag
spl:
WinGetPos,GX,GY,GW,GH,Main
_spx:=(GX+317)
_spy:=(GY+47)
WinMove,Status,%vkey%,%_spx%,%_spy%
ControlSetText,,%vkey%,Status
Return
;WinSet, TransColor,Default,Status
;WinSet, Transparent,140,Status
;------------------------------------------------------------------------------------------
; @@@@ @@@ @@@@@@ @@@ @@@ @ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@@ @@@@ @@ @@ @@@@@ @@ @@ @@ @@ @@@@ @@@@ @@@@@ @@@@@ ;
; @@@ @@ @@ @@ @@ @@ @@ @@@@@ @@@@ @@@@ @@@@ @@ @@ @@ @@ @@ @@ ;
; @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@ @@ @@ @@@@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ ;
; @@@@ @@@@ @@@ @@ @@ @@ @@@ @@ @@@@@@ @@@@ @@@@ @@@@ @@@@ @@ @@@@@ ;
;------------------------------------------------------------------------------------------;
;tag
;Sound Effects:
sfx:
Input, UserInput,T1 L1,{Escape},0,1,2,3,4,5,6,7,8,9
if ErrorLevel = Timeout
return
; Otherwise, a match was found.
sfx1:
SetKeyDelay, -1 ; Most editors can handle the fastest speed.
Loop, %A_ScriptDir%\se\%UserInput%\*.*
Run, %A_ScriptDir%\Wav.exe "%A_ScriptDir%\se\%UserInput%\%A_LoopFileName%"
; Run, %A_ScriptDir%\Wav.exe %A_ScriptDir%\se\%UserInput%\%A_LoopFileName% /Q,,Hide
vkey=done
gosub splash
goto sfx
sfxapplause:
Loop, %A_ScriptDir%\se\0\*.*
Run, %A_ScriptDir%\Wav.exe "%A_ScriptDir%\se\0\%A_LoopFileName%"
Return
;--------------------
; @@@ ;
; @@ ;
; @@@@ @@ @@@@@ ;
;@@ @@ @@ @@ ;
;@@ @@ @@@@ ;
;@@ @@ @@ @@ ;
; @@@@ @@@@ @@@@@ ;
;--------------------;
;tag
cls:
SetTimer,cls,off
If A_Gui>0
Return
Vkey:=
ControlSetText,,%vkey%,Status
Return
;--------------------------------------------------------------------------------
;@@@@@@ @@@ @ @@ @@@ @@@ ;
; @@ @@ @@ @@ @@ @@ @@ ;
; @@ @@@@ @@@@ @@ @@@@@ @@@ @@ @@@ @@@@ @@@@@ @@@@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@@@ ;
; @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ ;
; @@ @@@@ @@@@ @@@@ @@ @@@@ @@ @@@@ @@ @@ @@@@ @@@@ @@@@ ;
;-------------------------------------@@@----------------------------------------;
;tag
Tooltiponoff:
_tt=
OnMessage(0x200,"MOUSEOVER")=OnMessage(0x200,"")
GuiControlGet,_tt,,Button17
Iniwrite,%_tt%,%_ini%,ON-OFF,MOUSEOVER
if _tt=1
OnMessage(0x200,"MOUSEOVER")
Vkey=Visual help is Now OFF
if _tt=1
Vkey=Visual help is Now On
gosub history
Return
;------------------------------------
; @@@@@@ @@@ @@@ ;
; @@ @@ @@ ;
; @@ @@ @@@@ @@@@@ @@ @@ ;
; @@@@ @@ @@ @@ @@@ @@ ;
; @@ @@ @@@@@ @@@@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ ;
; @@ @@@@ @@@ @@ @@@@@ @@@ @@ ;
;------------------------------------;
;tag
Flash:
Gui,%zgui%:Flash
Vkey=Now select New lower right hand corner`nBy Left click where you think it should be.`nYou Have 3 seconds to act.
ControlSetText,,%vkey%,Status
Return
;------------------------------------------------------------
;@@ @@ @@ @@@ @@ @@ @@@ ;
;@@ @@ @@ @@@ @@@ @@ ;
;@@ @@ @@@ @@ @@@@ @@@@@@@ @@@@ @@ @@@@ ;
;@@@@@@ @@ @@@@@ @@ @@ @@@@@@@ @@ @@ @@@@@ @@ @@ ;
;@@ @@ @@ @@ @@ @@@@@@ @@ @ @@ @@ @@ @@ @@ @@@@@@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@@@ @@@ @@ @@@@ @@ @@ @@@@ @@@ @@ @@@@ ;
;------------------------------------------------------------;
;tag
hidemode1:
GuiControlGet,_hm,,Button18
Iniwrite,%_hm%,%_ini%,ON-OFF,hidemode
vkey=Hide Inactive Window Setting Off
If _hm=1
vkey=Hide Inactive Window Setting On
gosub history
hidemode:
Iniread,_hm,%_ini%,ON-OFF,hidemode
;MsgBox % _hm
if _hm=1
{
If _activemode=karaoke
{
gosub hidedj
WinActivate,Setup
Return
}
If _activemode=dj
{
gosub hideKaraoke
WinActivate,Setup
Return
}
}
Gui, 3:Show, x%ax3% y%ay3% , Karaoke Search
Gui, 4:Show, x%ax4% y%ay4% , Rotation
Gui, 5:Show, x%ax5% y%ay5% , Kj Favorites
Gui, 6:Show, x%ax6% y%ay6% , Dj Search
Gui, 7:Show, x%ax7% y%ay7% , Dj Playlist
Gui, 8:Show, x%ax8% y%ay8% , Dj Favorites
WinActivate,Setup
Return
;---------------------------------------------------------------------------------
;@@ @@ @@ @@@ @@@ @@ @@@ ;
;@@ @@ @@ @@ @@ @@ ;
;@@ @@ @@@ @@ @@@@ @@ @@ @@@@ @@ @@@ @@@@ @@@@ @@ @@ @@@@ ;
;@@@@@@ @@ @@@@@ @@ @@ @@@@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@@@@@ @@ @@ @@@@@ @@ @@ @@@@@ @@ @@ @@@@ @@@@@@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@@@ @@@ @@ @@@@ @@@ @@ @@@ @@ @@@@ @@@ @@ @@@@ @@@ @@ @@@@ ;
;---------------------------------------------------------------------------------;
;tag
hidekaraoke:
wind=3%A_Tab%Karaoke Search^4%A_Tab%Rotation^5%A_Tab%Kj Favorites
Gosub sizer
Gui, 6:Show
Gui, 7:Show
Gui, 8:Show
ControlSetText,,`nDisc Jockey Mode,Status
WinActivate,Main
If _hm<>1
Return
Gui, 3:Submit
Gui, 4:Submit
Gui, 5:Submit
Return
;------------------------------------------
;@@ @@ @@ @@@ @@@@@ @@ ;
;@@ @@ @@ @@ @@ ;
;@@ @@ @@@ @@ @@@@ @@ @@ @@ ;
;@@@@@@ @@ @@@@@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@@@@@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@@@ @@@ @@ @@@@ @@@@@ @@ @@ ;
;------------------------------------@@@@--;
;tag
hidedj:
wind=6%A_Tab%Dj Search^7%A_Tab%Dj Playlist^8%A_Tab%Dj Favorites
Gosub sizer
Gui, 3:Show
Gui, 4:Show
Gui, 5:Show
ControlSetText,,`nKaraoke Mode,Status
WinActivate,Main
If _hm<>1
Return
Gui, 6:Submit
Gui, 7:Submit
Gui, 8:Submit
Return
;-----------------------------------------------------------------------
; @ @@@ @@@ ;
; @@ @@ @@ ;
;@@@@@ @@@@ @@@ @@ @@@ @@ @@ @@@@ @@ @@ @@@@ @@ @@@@ ;
; @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@@@@ @@ @@ ;
; @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@ @@@@@@@ @@ @@ @@ @@ @@@@@@ ;
; @@ @ @@ @@ @@@@@ @@@@@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@ ;
; @@ @@@@ @@ @@ @@@@ @@@@ @@ @@ @@@@ @@@ @@ @@@@ ;
;--------------@@@@----@@@@---------------------------------------------;
;tag
togglemode:
; {
; Gui, 3:Show
; Gui, 4:Show
; Gui, 5:Show
; Gui, 6:Show
; Gui, 7:Show
; Gui, 8:Show
; WinActivate,Main
; }
;MsgBox % _activemode
If _activemode=karaoke
{
gosub hidekaraoke
_activemode=dj
vkey=DJ Mode Active
Gosub history
WinActivate,Main
Return
}
If _activemode=dj
{
gosub hidedj
vkey=Karaoke Mode Active
Gosub history
_activemode=karaoke
WinActivate,Main
Return
}
return
;tag
newsize:
Return
;------------------------------------------------------------------------------------------------
; @@ @@@ @@@@ @ @@ ;
; @@@@ @@ @@ @@ @@ ;
;@@ @@ @@@@@ @@@@ @@ @@ @@@@ @@ @@@ @@@ @@@@ @@@@ @@@@@ @@@ @@@@ @@@@@ ;
;@@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@@@@@ @@ @@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@@@ @@@ @@ @@@@ @@@@ @@@@ @@@@ @@@@ @@ @@@@ @@@@ @@ @@ ;
;------------------------------------------------------------------------------------------------;
;tag
;Anchor:
GuiSize:
;SetFormat, Integer, Hex
DllCall("QueryPerformanceCounter", "Int64P", t0)
;Anchor("edit", "w")
Anchor("f1", "")
GuiWidth := A_GuiWidth
DllCall("QueryPerformanceCounter", "Int64P", t1)
;MsgBox, % clipboard := (t1 - t0) / freq
Return
3GuiSize:
Anchor("list3", "w h")
Return
4GuiSize:
Anchor("list4", "w h")
Return
5GuiSize:
Anchor("list5", "w h")
Return
6GuiSize:
Anchor("list6", "w h")
Return
7GuiSize:
Anchor("list7", "w h")
Return
8GuiSize:
Anchor("list8", "w h")
Return
;----------------------------------------------
; @@@@ @@@ ;
;@@ @@ @@ ;
;@@@ @@@@ @@@@ @@ @@@ @@@@ @@ @@ ;
; @@@ @@ @@ @@ @@@ @@ @@ @@ @@@ @@ ;
; @@@ @@@@@@ @@@@@ @@ @@ @@ @@ @@ ;
;@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ ;
; @@@@ @@@@ @@@ @@ @@@@ @@@@ @@@ @@ ;
;----------------------------------------------;
;tag
search:
ControlSetText,,Type your search,Status
vkey=Search for a Song
gosub history
ControlFocus,Edit2,Main
_focus =`,Edit2`,Main`,
send ^a
Return
;----------------------------------------------------------------------------------------
;@@@ @@ @ @@@ @@@ ;
; @@ @@ @@ @@ ;
; @@ @@ @@@ @@@@@ @@@@@ @@@@ @@ @@@ @@ @@ @@@@@ @@@@ @@ @@@ @@@@ @@ @@ ;
; @@@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ ;
; @@ @@ @@ @@ @@ @ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ ;
;@@@ @@ @@@@ @@@@@ @@ @@@@ @@@@ @@ @@@@@ @@@@ @@@@ @@@@ @@@@ @@@@ ;
;------------------------------------------@@@@------------------------------------------;
;tag
history:
ControlSetText,,%vkey%,Status
ControlSend,Edit1,`n%vkey%,Main
;ControlFocus _focus
return
any other hints would be helpful as i have a lot of linking to do and plugins to create. but the gui's are working pretty good, and command history and mousover etc... i assume you have anchor.ahk handy......lol
this script is much easier to read using my subscript prog, but the bignotes make finding code easy too.