MODIFIED =20071224 QUEEN ;http://www.youtube.com/theroyalchannel < /* watch video through a 'hole' black screen escape to minimize rightclick to move the box (if needed) */ #NoEnv #SingleInstance force SetBatchLines,-1 FILENAME=QUEEN.ahk AUTHOR =garry http://www.autohotkey.com setworkingdir, %a_scriptdir% autotrim,off Settitlematchmode, 2 DetectHiddenText,on DetectHiddenWindows, on ; resolution 1280*1024 17'' WA=%A_screenwidth% HA=%A_screenheight% SW1 :=(WA*99 )/100 ;width show SW2 :=(WA*100)/100 ;width region SH1 :=(HA*96 )/100 ;height Gui,4:-Border Gui,4:Color,000000 ;BLACK ;Gui,4:Color,Teal ;teal Menu, Tray, Add, OPEN, GuiShow Menu, Tray, Default,OPEN Menu, Tray, Add, Close,CLOSE Menu, Tray, Add, About, About Menu, Tray, Add Menu, Tray, Add, Exit, Exit Menu, Tray, NoStandard Gui,4:Add,Text,cteal x50 y10 ,rightclick box to start Gui,4:Font,S16 cteal, Verdana Gui,4:Add,Text, y40 x50 w%SW2% vAL1,%BX2% Gui,4:Add,GroupBox, x50 y80 h40 w120 vGYTB ,QUEEN QUEEN=QUEEN Gui,4:show,x0 y0 h%SH1% w%SW1%,%QUEEN% return ;------------------------------------ 4GuiContextMenu: ;when rightclick can move the hole { Gui,4:submit,nohide HLP = %a_GuiControl% if HLP=GYTB { ;run,http://www.youtube.com ;run,http://www.youtube.com/watch?v=DSvKh7ecIaU run,http://www.youtube.com/theroyalchannel gosub,calc1 return } /* if HLP= { MouseGetPos,x1,y1 gosub,calc WinSet, Region,, %QUEEN% WinSet,Region, 0-0 %SW2%-0 %SW2%-%SH1% 0-%SH1% 0-0 %X1%-%Y1% %X2%-%Y1% %X2%-%Y2% %X1%-%Y2% %X1%-%Y1% ,%QUEEN% return } */ return } return ;------------------------------------ CALC: Gui,4:submit,nohide if B= B:=480 ;width if H= H:=362 ;height X2 :=(X1+B) ;2. x-position Y2 :=(Y1+H) ;2. y-position return ;------------------------------------ ;------------------------------------ CALC1: Gui,4:submit,nohide WinSet, Region,, %QUEEN% X1 :=(WA*45.8)/100 Y1 :=(HA*38.2 )/100 ;X1 :=586 ;x-position left top ;Y1 :=392 ;y-position ;msgbox,586=%X1% 392=%Y1% ;return B :=(WA*33.1 )/100 H :=(HA*34.1 )/100 ;B:=424 ;width ;H:=348 ;height ;msgbox,424=%B% 348=%H% ;return X2 :=(X1+B) ;2. x-position Y2 :=(Y1+H) ;2. y-position WinSet,Region, 0-0 %SW2%-0 %SW2%-%SH1% 0-%SH1% 0-0 %X1%-%Y1% %X2%-%Y1% %X2%-%Y2% %X1%-%Y2% %X1%-%Y1% ,%QUEEN% settimer,srchname,2000 return ;------------------------------------ ;------------- menu tray ------------ About: MsgBox, 64,%filename%,%modified% %author% Return GuiShow: reload Return ;------------------------------------- ;------------------------------------------------ SRCHNAME: Gui,4:submit,nohide Wingettitle,WGT,YouTube, if WGT=%WGT1% return if WGT contains YouTube { stringmid,WGT2,WGT,1,29 if WGT2=YouTube - Broadcast Yourself. Gui,4:show, maximize } GuiControl,4:Text,AL1,The Royal Channel WGT1=%WGT% return ;-------------------------------------------------------------- ;----------------- close: 4Guiclose: esc:: ;Gui,4:Hide Gui,4:show,minimize Return ;------------------ exit: exitapp ;===============================================================