Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Popcorn Movie Catalog (v1.0.4) - An unfinished project...


  • Please log in to reply
104 replies to this topic
Delusion
  • Members
  • 272 posts
  • Last active: Jul 13 2014 09:04 PM
  • Joined: 16 Jul 2008
Simple Movie Database written in ahk.

* This script is no longer maintained and its not finished.There is alot of bugs and things that need to be done.If you want to take it over and continue working on it please contact me *

Posted Image

DOWNLOAD
QuickSubs | Popcorn Movie Catalog
All my scripts are just in AutoHotkey v1.0.48.05

Fry
  • Members
  • 885 posts
  • Last active: Jan 17 2011 09:57 PM
  • Joined: 01 Nov 2007
Nice script, Just a tip


There is no need to put

"Process Priority , , High " in your script

Delusion
  • Members
  • 272 posts
  • Last active: Jul 13 2014 09:04 PM
  • Joined: 16 Jul 2008

Nice script, Just a tip


There is no need to put

"Process Priority , , High " in your script


thanks :D

i updated it a bit and made some changes/improvements...
i also re-organized the code so that its easier to read..it was a real mess before
code has been changed in the first post
QuickSubs | Popcorn Movie Catalog
All my scripts are just in AutoHotkey v1.0.48.05

GSM
  • Guests
  • Last active:
  • Joined: --
nice script and nice looking gui

maybe you could make it so that when the user edits a movie it automatically updates it in the list.i guess with lv modify.
and for delete too.because the movie does not immediately dissapear from the list when its deleted

deportivo5
  • Members
  • 44 posts
  • Last active: Jan 22 2009 08:03 AM
  • Joined: 05 Sep 2008
hey..
i tried using ur gui..
but i just cant have it loaded to my list..
it will show at the tray that "a new movie is loaded"
and reloads,
but the list has no new addition..
it remains empty.
I have lost friends, some by death... others through sheer inability to cross the street.
Virginia Woolf (1882 - 1941),

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.

Chavez
  • Members
  • 256 posts
  • Last active: Oct 13 2009 01:27 PM
  • Joined: 20 Aug 2008
The button text looks VERY scrambled on my workstation at work:

Posted Image
-Chavez.

deportivo5
  • Members
  • 44 posts
  • Last active: Jan 22 2009 08:03 AM
  • Joined: 05 Sep 2008
this is because of the "titlebar.bmp"
im sure u dont hv a bit map picture in ur C:\WINDOWS\titlebar.bmp
somehow after 1st attempt, after restarting my com, den inside my windows hv le..
so it no longer becomes a problem.
the messy words is acutally the directory.
I have lost friends, some by death... others through sheer inability to cross the street.
Virginia Woolf (1882 - 1941),

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.

Delusion
  • Members
  • 272 posts
  • Last active: Jul 13 2014 09:04 PM
  • Joined: 16 Jul 2008
try the latest version if it works for you deportivo5 :

i made some changes in the titlebar part aswell.maybe it works better now
the problem could also be that the computer at your work doesnt allow files to be moved in windir or doesnt allow the script to create files.i had that problem at a computer at work too

deportivo5
  • Members
  • 44 posts
  • Last active: Jan 22 2009 08:03 AM
  • Joined: 05 Sep 2008
Hi delusion.
thanks for ur new version..
its so much better..

i was just trying out..
adding a pause button to the script..
wanted to add something like a pause button that i could pause the movie.
I managed to add in the button physically.
However, I am still unable to define the button's properties..
where do I change the button's function?

Thanks
I have lost friends, some by death... others through sheer inability to cross the street.
Virginia Woolf (1882 - 1941),

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.

Delusion
  • Members
  • 272 posts
  • Last active: Jul 13 2014 09:04 PM
  • Joined: 16 Jul 2008
you mean a pause button to pause movie playback?

the "buttons" in my script are not exactly buttons.its text modified so that it looks like a button and theres a few things you need to edit..posting some code would be helpfull

anyway..i still dont understand why a pause button would be usefull

deportivo5
  • Members
  • 44 posts
  • Last active: Jan 22 2009 08:03 AM
  • Joined: 05 Sep 2008
;BUTTONS SUNKEN
   Gui %v_MainGui%: Font, Bold, Arial
   Gui %v_MainGui%: Add, Text, x100 y364 w62 h15 BackgroundTrans Center vPauseSunkenS1 g_MAINGUIPauseButton cWhite, Pause Movie
   Gui %v_MainGui%: Add, Text, x101 y364 w62 h15 BackgroundTrans 0x1000 Center vPauseSunkenS2 g_MAINGUIPauseButton cBlack, Pause Movie
   Gui %v_MainGui%: Add, Text, x181 y364 w62 h15 BackgroundTrans Center vPrintSunkenS1 g_MAINGUIPrintButton cWhite,Print ;SUNKEN EFFECT SHADOW
   Gui %v_MainGui%: Add, Text, x180 y362 w62 h15 BackgroundTrans 0x1000 Center vPrintSunkenS2 g_MAINGUIPrintButton cBlack,Print ;SUNKEN EFFECT
   Gui %v_MainGui%: Add, Text, x253 y364 w62 h15 BackgroundTrans Center vAddGuiSunkenS1 g_MAINGUIAddButton cWhite,Add Movie ;SUNKEN EFFECT SHADOW
   Gui %v_MainGui%: Add, Text, x252 y362 w62 h15 BackgroundTrans 0x1000 Center vAddGuiSunkenS2 g_MAINGUIAddButton cBlack,Add Movie ;SUNKEN EFFECT
;BUTTONS NORMAL
   Gui %v_MainGui%: Add, Text, x100 y364 w62 h15 BackgroundTrans Center vPauseNormalS1 g_MAINGUIPauseButton cWhite, Pause Movie
   Gui %v_MainGui%: Add, Text, x101 y364 w62 h15 BackgroundTrans Center Center vPauseNormalS2 g_MAINGUIPauseButton cBlack, Pause Movie
   Gui %v_MainGui%: Add, Text, x181 y364 w62 h15 BackgroundTrans Center vPrintNormalS1 g_MAINGUIPrintButton cWhite,Print ;SHADOW
   Gui %v_MainGui%: Add, Text, x180 y362 w62 h15 BackgroundTrans Border Center vPrintNormalS2 g_MAINGUIPrintButton cBlack,Print
   Gui %v_MainGui%: Add, Text, x253 y364 w62 h15 BackgroundTrans Center vAddGuiNormalS1 g_MAINGUIAddButton cWhite,Add Movie ;SHADOW
   Gui %v_MainGui%: Add, Text, x252 y362 w62 h15 BackgroundTrans Border Center vAddGuiNormalS2 g_MAINGUIAddButton cBlack,Add Movie

;________MAIN GUI - BUTTONS____________________________|

;MAIN GUI - ADD BUTTON EFFECT
_MAINGUIAddButton:
  ButtonEffect("AddGuiNormalS1","AddGuiNormalS2","_ADDGUI")
RETURN

;MAIN GUI - PRINT BUTTON EFFECT
_MAINGUIPrintButton:
  ButtonEffect("PrintNormalS1","PrintNormalS2","_MAINGUIPrint")
RETURN

;MAIN GUI - PAUSE BUTTON EFFECT
_MAINGUIPauseButton:
   ButtonEffect("PauseNormalS1","PauseNormalS2","_MAINGUIPause")
RETURN

These are the parts that I had added in. However, when pressing the pause button, i Will get an error at this sentence.

;________GLOBAL - BUTTON EFFECT________________________|

ButtonEffect( BV1, BV2, SubR) {
  Global
  GuiControl Hide, %BV1%
  GuiControl Hide, %BV2%
  Loop {
    MouseDown := GetKeyState("LButton","P")
    If (!MouseDown) {
       Click = 1
       Break
    }
  }
  GuiControl Show, %BV1%
  GuiControl Show, %BV2%
  IfEqual Click, 1, GoSub, %SubR%
  Click =
}


I have lost friends, some by death... others through sheer inability to cross the street.
Virginia Woolf (1882 - 1941),

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.

Delusion
  • Members
  • 272 posts
  • Last active: Jul 13 2014 09:04 PM
  • Joined: 16 Jul 2008
/*
MOVIE LAUNCHER by Alex Sotirakis                                          Last Modified: 24/10/2008

Contact Email : alexpersonal15[at]yahoo.com
AHK Forum Username : Delusion

Many Thanks to :
  garry - for the Help with SplitPath and Adding Movies,Printing Only Parts of a Line
  Superfraggle - for the Help with Clearing the Search Edit Control on DoubleClicking
  Laszlo - for the Credits Animation
  Veovis - for the Image Embedding
  SKAN - for the Button Effect(MMPS Type Button),for the Shadowed Text Effect,for the Minimize/Maximize Animation and for the Titlebar Hex Code

Known Issues :
  - Searching and Counting might lag on slower computers.(Searched Movies and Movie Count will not be displayed correctly)any tips on speeding it up?
  - About Gui might flicker on slower computers
  - If you close the About Gui before the animation ends you cant open it again from the "?" Button.
  - Sometimes when you clear the searchbar too fast the movies will not be added correctly again and the counting will be wrong.
*/

;________START_________________________________________|

#NoEnv
#SingleInstance Force
#Persistent
SetBatchLines -1
SetWinDelay -1
SetControlDelay -1
DetectHiddenWindows On

;________MAIN__________________________________________|

  LoadMainVars(), MAINGUI(), TrayMenu()
RETURN

;________MAIN VARS_____________________________________|

LoadMainVars() {
Global
   v_ProgramName = Movie Launcher
      v_MainGui = 1
   v_AboutGuiName = About
      v_AboutGui = 2
   v_AddGuiName = Add New Movie
      v_AddGui = 3
   v_EditGuiName = Edit Movie
      v_EditGui = 4
   v_DelGuiName = Delete Movie
      v_DelGui = 5
   v_Version = 1.7.5
   v_MovieList = %A_ScriptDir%\MovieList.txt
   v_PrintTxt = %A_ScriptDir%\MovieListPrint.txt
}

;________GLOBAL ACTIONS________________________________|

_Hide:
;ADD GUI DESTROY
   IFWinExist %v_AddGuiName%
      Gui %v_AddGui%: Destroy
;ABOUT GUI DESTROY
   IFWinExist %v_AboutGuiName%
      Gui %v_AboutGui%: Destroy
;EDIT GUI DESTROY
  IFWinExist %v_EditGuiName%
      Gui %v_EditGui%: Destroy
;DELETE GUI DESTROY
  IFWinExist %v_DelGuiName%
    Gui %v_DelGui%: Destroy
;MINIMIZE ANIMATION
   Menu("Tray","Disable","Hide"), Menu("Tray","Enable","Show")
     MinimizeGuiToTray( R, MLWIN_ID )
RETURN

;RESTORE GUI FROM TRAY
_Show:
   DllCall("DrawAnimatedRects", UInt,MLWIN_ID, Int,3, UInt,&R+16, UInt,&R ) ;RESTORE ANIMATION
   Gui Show, , %v_ProgramName%
   Menu("Tray","Disable","Show"), Menu("Tray","Enable","Hide")
RETURN

;TRAY MENU - EDIT
_Edit:
   Edit
RETURN

;TRAY MENU - RELOAD
_Reload:
   Reload
RETURN

;GLOBAL - EXIT
_Exit:
GuiClose:
   ExitApp

;______________________________________________________.
;________MAIN GUI______________________________________|
;______________________________________________________|

MAINGUI() {
Global
   Gui %v_MainGui%: Destroy
   Gui %v_MainGui%: +LastFound +ToolWindow +Border +Theme -Caption ;+E0x40000
   Gui %v_MainGui%: Font, Bold, Arial
;CREATE GRADIENT
   IfNotExist %A_WinDir%\Titlebar.bmp
      {
        CreateTitleBar()
        WriteFile("Titlebar.bmp",Titlebar)
      }
   IfExist %A_ScriptDir%\Titlebar.bmp
      {
        FileMove %A_ScriptDir%\Titlebar.bmp, %A_WinDir%\Titlebar.bmp
      }
   Titlebar = ;free memory
;ADD GRADIENTS
   Gui %v_MainGui%: Add, Picture, x-1 y-1 w320 h15 , %A_WinDir%\Titlebar.bmp ;TITLE GRADIENT
   Gui %v_MainGui%: Add, Picture, x-1 y385 w320 h15, %A_WinDir%\Titlebar.bmp ;STATUSBAR GRADIENT
   Gui %v_MainGui%: Add, Picture, x180 y362 w62 h15, %A_WinDir%\Titlebar.bmp ;BUTTON GRADIENT
   Gui %v_MainGui%: Add, Picture, x252 y362 w62 h15, %A_WinDir%\Titlebar.bmp ;BUTTON2 GRADIENT
   Gui %v_MainGui%: Add, Picture, x107 y362 w62 h15, %A_WinDir%\Titlebar.bmp ;PAUSE BUTTON GRADIENT
;TITLE NAME
   Gui %v_MainGui%: Add, Text, x6 y1 w273 h15 Center BackgroundTrans g_GuiMove cWhite, %v_ProgramName% ;SHADOW
   Gui %v_MainGui%: Add, Text, x5 y0 w273 h15 Center BackgroundTrans g_GuiMove cBlack, %v_ProgramName%
;TITLEBAR BUTTONS
   Gui %v_MainGui%: Add, Text, x282 y2 w13 h15 BackgroundTrans g_AboutGui cWhite,%A_Space%? ;SHADOW
   Gui %v_MainGui%: Add, Text, x294 y-1 w13 h18 BackgroundTrans g_Hide cWhite,%A_Space%_ ;SHADOW
   Gui %v_MainGui%: Add, Text, x308 y2 w13 h15 BackgroundTrans g_Exit cWhite,%A_Space%x ;SHADOW
   Gui %v_MainGui%: Add, Text, x280 y0 w14 h16 BackgroundTrans g_AboutGui Border cBlack,%A_Space%?
   Gui %v_MainGui%: Add, Text, x293 y-3 w14 h18 BackgroundTrans g_Hide Border cBlack,%A_Space%_
   Gui %v_MainGui%: Add, Text, x306 y0 w14 h15 BackgroundTrans g_Exit Border cBlack,%A_Space%x
;FRAMES
   Gui %v_MainGui%: Add, GroupBox, x0 y-7 w320 h408 BackgroundTrans 0x8000, ;BIG FRAME
   Gui %v_MainGui%: Add, GroupBox, x0 y-7 w320 h23 BackgroundTrans 0x8000, ;TITLE FRAME
   Gui %v_MainGui%: Add, GroupBox, x280 y-7 w14 h23 BackgroundTrans 0x8000, ;ABOUT FRAME
   Gui %v_MainGui%: Add, GroupBox, x293 y-7 w14 h23 BackgroundTrans 0x8000, ;HIDE FRAME
   Gui %v_MainGui%: Add, GroupBox, x306 y-7 w14 h23 BackgroundTrans 0x8000, ;EXIT FRAME
   Gui %v_MainGui%: Add, GroupBox, x0 y378 w320 h23 BackgroundTrans 0x8000, ;STATUSBAR FRAME
   Gui %v_MainGui%: Add, GroupBox, x220 y378 w100 h23 BackgroundTrans 0x8000, ;STATUSBAR SEPARATOR FRAME
;SEARCH TEXT
   Gui %v_MainGui%: Add, Text, x5 y23 , Search :
;STATUSBAR
   Gui %v_MainGui%: Add, Text, x6 y387 w120 h16 BackgroundTrans vTMoviesS cWhite,Total Movies : %MovieCount%
   Gui %v_MainGui%: Add, Text, x5 y386 w120 h16 BackgroundTrans vTMovies cBlack,Total Movies : %MovieCount%
   Gui %v_MainGui%: Add, Text, x226 y387 w120 h16 BackgroundTrans cWhite,by Alex Sotirakis ;SHADOW
   Gui %v_MainGui%: Add, Text, x225 y386 w120 h16 BackgroundTrans cBlack,by Alex Sotirakis
   Gui %v_MainGui%: Font, Norm, Arial
;SEARCH BAR  
   Gui %v_MainGui%: Add, Edit, x58 y20 w257 h20 BackgroundWhite Limit40 +Default vMOVIESEARCH g_MovieSearch,
   Onmessage(0x203,"DoubleClickClear") ;<- REMOVE IF YOU DONT WANT THE SEARCH BAR TO CLEAR ON DOUBLECLICK
   GuiControl %v_MainGui%: Focus, MOVIESEARCH
   ;Gui %v_MainGui%: Add, GroupBox, x58 y13 w257 h26 BackgroundTrans 0x8000, ;SEARCH FRAME
;LIST
   Gui %v_MainGui%: Add, ListView, x5 y43 w310 h313 +Hdr Grid Sort Count -LV0x10 Report vLIST g_ListEvents BackgroundWhite cBlack AltSubmit, Title :|Path :
   LV_ModifyCol(1, 290), LV_ModifyCol(2, 200)
   MovieListRead(), MovieCount() ;LOAD LIST AND COUNT MOVIES
   ;Gui %v_MainGui%: Add, GroupBox, x5 y36 w310 h320 BackgroundTrans 0x8000, ;LISTVIEW FRAME
;BUTTONS SUNKEN
   Gui %v_MainGui%: Font, Bold, Arial
   Gui %v_MainGui%: Add, Text, x181 y364 w62 h15 BackgroundTrans Center vPrintSunkenS1 g_MAINGUIPrintButton cWhite,Print ;SUNKEN EFFECT SHADOW
   Gui %v_MainGui%: Add, Text, x180 y362 w62 h15 BackgroundTrans 0x1000 Center vPrintSunkenS2 g_MAINGUIPrintButton cBlack,Print ;SUNKEN EFFECT
   Gui %v_MainGui%: Add, Text, x253 y364 w62 h15 BackgroundTrans Center vAddGuiSunkenS1 g_MAINGUIAddButton cWhite,Add Movie ;SUNKEN EFFECT SHADOW
   Gui %v_MainGui%: Add, Text, x252 y362 w62 h15 BackgroundTrans 0x1000 Center vAddGuiSunkenS2 g_MAINGUIAddButton cBlack,Add Movie ;SUNKEN EFFECT 
   Gui %v_MainGui%: Add, Text, x108 y364 w62 h15 BackgroundTrans Center vPauseSunkenS1 g_MAINGUIPauseButton cWhite,Pause ;SUNKEN EFFECT SHADOW
   Gui %v_MainGui%: Add, Text, x107 y362 w62 h15 BackgroundTrans 0x1000 Center vPauseSunkenS2 g_MAINGUIPauseButton cBlack,Pause ;SUNKEN EFFECT 
   ;BUTTONS NORMAL
   Gui %v_MainGui%: Add, Text, x181 y364 w62 h15 BackgroundTrans Center vPrintNormalS1 g_MAINGUIPrintButton cWhite,Print ;SHADOW
   Gui %v_MainGui%: Add, Text, x180 y362 w62 h15 BackgroundTrans Border Center vPrintNormalS2 g_MAINGUIPrintButton cBlack,Print
   Gui %v_MainGui%: Add, Text, x253 y364 w62 h15 BackgroundTrans Center vAddGuiNormalS1 g_MAINGUIAddButton cWhite,Add Movie ;SHADOW
   Gui %v_MainGui%: Add, Text, x252 y362 w62 h15 BackgroundTrans Border Center vAddGuiNormalS2 g_MAINGUIAddButton cBlack,Add Movie
   Gui %v_MainGui%: Add, Text, x108 y364 w62 h15 BackgroundTrans Center vPauseNormalS1 g_MAINGUIPauseButton cWhite,Pause ;SHADOW
   Gui %v_MainGui%: Add, Text, x107 y362 w62 h15 BackgroundTrans Border Center vPauseNormalS2 g_MAINGUIPauseButton cBlack,Pause
;SHOW GUI
   Gui %v_MainGui%: Font, Norm, Arial
   Gui %v_MainGui%: Show, w320 h401 , %v_ProgramName%
   Gui %v_MainGui%: Color, White
   MLWIN_ID := WinExist()
   WinSet Transparent, 230, ahk_id %MLWIN_ID%
}

;________MAIN GUI - LISTVIEW EVENTS____________________|

_ListEvents:
if A_GuiControlEvent = DoubleClick ;DOUBLECLICK LAUNCH
{
   LV_GetText(FilePath, A_EventInfo, 2)
    if FilePath = 
      {
         ControlGet TempLaunchVar, List, Selected, SysListView321, %v_ProgramName%, 
         TrayTip %v_ProgramName%, Error!`n%TempLaunchVar%`ncould not be Launched!,,3
         SetTimer _RemoveTrayTip, 1800
      }
      Else
      {
         Run %FilePath%,, UseErrorLevel
            if ErrorLevel = 1
            {
              ControlGet TempLaunchVar, List, Selected, SysListView321, %v_ProgramName%,
              TrayTip %v_ProgramName%, Error!`n%TempLaunchVar%`ncould not be Launched!,,3
              SetTimer _RemoveTrayTip, 1800
            }
      }
RETURN
}
if A_GuiControlEvent = RightClick ;RIGHTCLICK MENU
{
   Menu("RightClickMenu","Add","Edit","_EDITGUI"), Menu("RightClickMenu","Add","Delete","_DELETEGUI"), Menu("RightClickMenu","Show",A_GuiX,A_GuiY)
}
RETURN

;________MAIN GUI - MOVIE SEARCH_______________________|

_MovieSearch:
   Gui %v_MainGui%: Submit, NoHide
   LV_Delete()
   Loop Read, %v_MovieList% 
    {
    LR = %A_LoopReadLine%
    StringSplit, C, LR,`;
    CX = %C1%%C2%
       IfInString, CX, %MOVIESEARCH%
          {
             LV_Add("", C1, C2) 
          }
    }
    MovieCount()
    LR = ;free memory
RETURN

;________MAIN GUI - MOVIELIST FILE READ________________|

MovieListRead() {
Global
Loop Read, %v_MovieList%
   {
   LR = %A_LoopReadLine%
   if LR =
      Continue
   Stringsplit, C, LR,`;
   SplitPath, C2, namex, dir, ext, name_no_ext, drive
   LV_Add("", C1, C2)  
   }
   LR = ;free memory
}

;________MAIN GUI - MOVIE COUNT________________________|

MovieCount() {
Global
   LV_Modify(0, "Select"). 
   MovieCount = % LV_GetCount("Select")
   GuiControl Text, TMoviesS, Total Movies : %MovieCount%
   GuiControl Text, TMovies, Total Movies : %MovieCount%
   Sleep 1
   LV_Modify(0, "-Select").
   MovieCount = ;free memory
}

;________MAIN GUI - BUTTONS____________________________|

;MAIN GUI - ADD BUTTON EFFECT
_MAINGUIAddButton:
  ButtonEffect("AddGuiNormalS1","AddGuiNormalS2","_ADDGUI")
RETURN

;MAIN GUI - PRINT BUTTON EFFECT
_MAINGUIPrintButton:
  ButtonEffect("PrintNormalS1","PrintNormalS2","_MAINGUIPrint")
RETURN 

;MAIN GUI - PAUSE BUTTON EFFECT
_MAINGUIPauseButton:
  ButtonEffect("PauseNormalS1","PauseNormalS2","_MAINGUIPause")
RETURN

;________MAIN GUI - CLEAR SEARCH BAR___________________|

DoubleClickClear() {
    if (A_GuiControl = "MOVIESEARCH") {
        GuiControl , , MOVIESEARCH,
    }
}
RETURN

;________MAIN GUI - MINIMIZE EFFECT____________________|

MinimizeGuiToTray(ByRef R, hGui){
 WinGetPos, X0,Y0,W0,H0, % "ahk_id " (Tray:=WinExist("ahk_class Shell_TrayWnd")) 
 ControlGetPos, X1,Y1,W1,H1, TrayNotifyWnd1,ahk_id %Tray% 
 SW:=A_ScreenWidth,SH:=A_ScreenHeight,X:=SW-W1,Y:=SH-H1,P:=((Y0>(SH/3))?("B"):(X0>(SW/3)) 
 ? ("R"):((X0<(SW/3))&&(H0<(SH/3)))?("T"):("L")),((P="L")?(X:=X1+W0):(P="T")?(Y:=Y1+H0):) 
 VarSetCapacity(R,32,0), DllCall( "GetWindowRect",UInt,hGui,UInt,&R) 
 NumPut(X,R,16), NumPut(Y,R,20), DllCall("RtlMoveMemory",UInt,&R+24,UInt,&R+16,UInt,8 ) 
 DllCall("DrawAnimatedRects", UInt,hGui, Int,3, UInt,&R, UInt,&R+16 ) 
 WinHide, ahk_id %hGui% 
}

;________MAIN GUI - PRINT______________________________|

;PRINT SUB
_MAINGUIPrint:
IfExist %v_PrintTxt%
    FileDelete %v_PrintTxt%
;REMOVE FILEPATHS
  TrayTip %v_ProgramName%, Preparing Print Operation,,1
  SetTimer _RemoveTrayTip, 2000
  Loop Read, %v_MovieList%
    {
    LR = %A_LoopReadLine%
    StringSplit, C, LR, `;
    Fileappend %C1%`r`n, %v_PrintTxt%
    }
;SORT ALPHABETICAL
  FileRead Sorted, %v_PrintTxt%
  if not ErrorLevel  
  {
    Sort Sorted
    FileDelete %v_PrintTxt%
    FileAppend %Sorted%, %v_PrintTxt%
    Sorted = ;free memory
  }
;START PRINTING
  ;Run %v_PrintTxt%
  Sleep 5
  ;WinWait MovieListPrint.txt, , , , 
  LR =
  MsgBox 4, %v_ProgramName%, Are you sure you want to Print "%v_PrintTxt%" ?
  IfMsgBox Yes 
  {
    Run Print "%v_PrintTxt%"
  }
  Else 
  {
    FileDelete %v_PrintTxt%
    RETURN
  }
RETURN

;________MAIN GUI - PAUSE_______________________________|

_MAINGUIPause:
;ADD CODE HERE
RETURN

;______________________________________________________.
;________ADD GUI_______________________________________|
;______________________________________________________|

_ADDGUI:
   Gui %v_AddGui%: Destroy
   Gui %v_AddGui%: +LastFound +ToolWindow +Border -Caption -Theme +Owner
   Gui %v_AddGui%: Font, Bold, Arial
;GRADIENTS
   Gui %v_AddGui%: Add, Picture, x0 y0 w320 h15 , %A_WinDir%\Titlebar.bmp ;TITLE GRADIENT
   Gui %v_AddGui%: Add, Picture, x50 y118 w80 h15 , %A_WinDir%\Titlebar.bmp ;BUTTON 1 GRADIENT
   Gui %v_AddGui%: Add, Picture, x150 y118 w80 h15 , %A_WinDir%\Titlebar.bmp ;BUTTON 2 GRADIENT
   Gui %v_AddGui%: Add, Picture, x252 y74 w18 h18 , %A_WinDir%\Titlebar.bmp ;SELECT PATH GRADIENT
;TITLE NAME
   Gui %v_AddGui%: Add, Text, x4 y1 w272 h15 Center BackgroundTrans g_GuiMove cWhite, %v_AddGuiName% ;SHADOW
   Gui %v_AddGui%: Add, Text, x3 y0 w272 h15 Center BackgroundTrans g_GuiMove cBlack, %v_AddGuiName%
;FRAMES
   Gui %v_AddGui%: Add, GroupBox, x0 y-7 w280 h145 BackgroundTrans 0x8000, ;BIG FRAME
   Gui %v_AddGui%: Add, GroupBox, x0 y-7 w280 h23 BackgroundTrans 0x8000, ;TITLE FRAME
;TEXT
   Gui %v_AddGui%: Add, Text, x10 y37 w70 h15 Left cBlack,Movie Title :
   Gui %v_AddGui%: Add, Text, x10 y+25 w70 h15 Left cBlack,Movie Path :
;EDIT CONTROLS
   C1 =
   C2 =
   Gui %v_AddGui%: Add, Edit, x90 y35 w180 h20 vA41,%C1%
   Gui %v_AddGui%: Add, GroupBox, x90 y28 w180 h26 BackgroundTrans 0x8000, ;TITLE FRAME
   Gui %v_AddGui%: Add, Edit, x90 y+20 w160 h20 vA42,%C2%
   Gui %v_AddGui%: Add, GroupBox, x90 y67 w160 h26 BackgroundTrans 0x8000, ;PATH FRAME
;SELECT FOLDER BUTTON
   Gui %v_AddGui%: Add, Text, x253 y76 w18 h18 BackgroundTrans vSelectedSunkenS1 g_ADDGUISelectButton Center cWhite, ... ;SUNKEN EFFECT SHADOW
   Gui %v_AddGui%: Add, Text, x252 y74 w18 h18 BackgroundTrans 0x1000 vSelectedSunkenS2 g_ADDGUISelectButton Center cBlack, ... ;SUNKEN EFFECT
   Gui %v_AddGui%: Add, Text, x253 y76 w18 h18 BackgroundTrans vSelectedNormalS1 g_ADDGUISelectButton Center cWhite, ... ;SHADOW
   Gui %v_AddGui%: Add, Text, x252 y74 w18 h18 BackgroundTrans vSelectedNormalS2 Border g_ADDGUISelectButton Center cBlack, ...
;BUTTONS SUNKEN
   Gui %v_AddGui%: Add, Text, x51 y120 w80 h15 BackgroundTrans Center vAddSunkenS1 g_ADDGUIAddButton cWhite, Add ;SUNKEN EFFECT SHADOW
   Gui %v_AddGui%: Add, Text, x151 y120 w80 h15 BackgroundTrans Center vCancelSunkenS1 g_ADDGUICancelButton cWhite, Cancel ;SUNKEN EFFECT SHADOW
   Gui %v_AddGui%: Add, Text, x50 y118 w80 h15 BackgroundTrans 0x1000 Center vAddSunkenS2 g_ADDGUIAddButton cBlack, Add ;SUNKEN EFFECT
   Gui %v_AddGui%: Add, Text, x150 y118 w80 h15 BackgroundTrans 0x1000 Center vCancelSunkenS2 g_ADDGUICancelButton cBlack, Cancel ;SUNKEN EFFECT
;BUTTONS NORMAL
   Gui %v_AddGui%: Add, Text, x51 y120 w80 h15 BackgroundTrans Center vAddNormalS1 g_ADDGUIAddButton cWhite, Add ;SHADOW
   Gui %v_AddGui%: Add, Text, x151 y120 w80 h15 BackgroundTrans Center vCancelNormalS1 g_ADDGUICancelButton cWhite, Cancel ;SHADOW
   Gui %v_AddGui%: Add, Text, x50 y118 w80 h15 BackgroundTrans Center Border vAddNormalS2 g_ADDGUIAddButton cBlack, Add
   Gui %v_AddGui%: Add, Text, x150 y118 w80 h15 BackgroundTrans Center Border vCancelNormalS2 g_ADDGUICancelButton cBlack, Cancel
;SHOW GUI
   Gui %v_AddGui%: Show,w280 h138, %v_AddGuiName%
   Gui %v_AddGui%: Color, White
   ADWIN_ID := WinExist()
   WinSet Transparent, 230, ahk_id %ADWIN_ID%
RETURN

;________ADD GUI - BUTTONS_____________________________|

;ADD GUI - ADD BUTTON EFFECT
_ADDGUIAddButton:
  ButtonEffect("AddNormalS1","AddNormalS2","_ADDGUIAdd")
RETURN

;ADD GUI - CANCEL BUTTON EFFECT
_ADDGUICancelButton:
  ButtonEffect("CancelNormalS1","CancelNormalS2","_ADDGUICancel")
RETURN

;ADD GUI - SELECT BUTTON EFFECT
_ADDGUISelectButton:
  ButtonEffect("SelectedNormalS1","SelectedNormalS2","_ADDGUISelect")
RETURN

;________ADD GUI - SUBS________________________________|

;ADD GUI - ADD
_ADDGUIAdd:
  GuiControlGet A41
  If A41 = 
  {
    TrayTip %v_ProgramName%, Error!`nNo Data has been Inserted!,,3
    SetTimer _RemoveTrayTip, 1800
  }
  Else
  {
    Gui %v_AddGui%: Submit
    FileAppend `n%A41%;%A42%, %v_MovieList%
    Gui %v_AddGui%: Destroy
    TrayTip %v_ProgramName%, New Movie Added!,,1
    SetTimer _RemoveTrayTip, 1800
    Sleep 500
    Reload
  }
RETURN

;ADD GUI - CANCEL
_ADDGUICancel:
   Gui %v_AddGui%: Destroy
RETURN

;ADD GUI - SELECT 
_ADDGUISelect:
  FileSelectFile SelectedFile, S, %A_ScriptDir%, Select Movie Path, Video Files (*.avi; *.wmv; *.mpg; *.divx; *.mov)
  if SelectedFile =
    {
      RETURN
    }
    Else
    {
      GuiControl %v_AddGui%: Text, A42, %SelectedFile%
    }
  SelectedFile = ;free memory
RETURN

;______________________________________________________.
;________EDIT GUI______________________________________|
;______________________________________________________|

_EDITGUI:
   Gui %v_EditGui%: Destroy
   Gui %v_EditGui%: +LastFound +ToolWindow +Border -Caption -Theme +Owner
   Gui %v_EditGui%: Font, Bold, Arial
;GRADIENTS
   Gui %v_EditGui%: Add, Picture, x0 y0 w320 h15 , %A_WinDir%\Titlebar.bmp ;TITLE GRADIENT
   Gui %v_EditGui%: Add, Picture, x50 y118 w80 h15 , %A_WinDir%\Titlebar.bmp ;BUTTON 1 GRADIENT
   Gui %v_EditGui%: Add, Picture, x150 y118 w80 h15 , %A_WinDir%\Titlebar.bmp ;BUTTON 2 GRADIENT
   Gui %v_EditGui%: Add, Picture, x252 y74 w18 h18 , %A_WinDir%\Titlebar.bmp ;SELECT PATH GRADIENT
;TITLE NAME
  Gui %v_EditGui%: Add, Text, x4 y1 w272 h15 Center BackgroundTrans g_GuiMove cWhite, %v_EditGuiName% ;SHADOW
   Gui %v_EditGui%: Add, Text, x3 y0 w272 h15 Center BackgroundTrans g_GuiMove cBlack, %v_EditGuiName%
;FRAMES
   Gui %v_EditGui%: Add, GroupBox, x0 y-7 w280 h145 BackgroundTrans 0x8000, ;BIG FRAME
   Gui %v_EditGui%: Add, GroupBox, x0 y-7 w280 h23 BackgroundTrans 0x8000, ;TITLE FRAME
;TEXT
   Gui %v_EditGui%: Add, Text, x10 y37 w70 h15 Left cBlack,Edit Title :
   Gui %v_EditGui%: Add, Text, x10 y+25 w70 h15 Left cBlack,Edit Path :
;EDIT CONTROLS
  ESM := LV_GetNext("C")
  LV_GetText(E1,ESM,1)
  LV_GetText(E2,ESM,2)
    if ESM = 0
    {
      E1 =
      E2 =
    }
   Gui %v_EditGui%: Add, Edit, x90 y35 w180 h20 vED1, %E1% ;TITLE
   Gui %v_EditGui%: Add, GroupBox, x90 y28 w180 h26 BackgroundTrans 0x8000, ;TITLE FRAME
   Gui %v_EditGui%: Add, Edit, x90 y+20 w160 h20 vED2, %E2% ;PATH
   Gui %v_EditGui%: Add, GroupBox, x90 y67 w160 h26 BackgroundTrans 0x8000, ;PATH FRAME
;SELECT FOLDER BUTTON
   Gui %v_EditGui%: Add, Text, x253 y76 w18 h18 BackgroundTrans vSelectedSunkenS11 g_EDITGUISelectButton Center cWhite, ... ;SUNKEN EFFECT SHADOW
   Gui %v_EditGui%: Add, Text, x252 y74 w18 h18 BackgroundTrans 0x1000 vSelectedSunkenS22 g_EDITGUISelectButton Center cBlack, ... ;SUNKEN EFFECT
   Gui %v_EditGui%: Add, Text, x253 y76 w18 h18 BackgroundTrans vSelectedNormalS11 g_EDITGUISelectButton Center cWhite, ... ;SHADOW
   Gui %v_EditGui%: Add, Text, x252 y74 w18 h18 BackgroundTrans vSelectedNormalS22 Border g_EDITGUISelectButton Center cBlack, ...
;BUTTONS SUNKEN
   Gui %v_EditGui%: Add, Text, x51 y120 w80 h15 BackgroundTrans Center vEditSunkenS1 g_EDITGUIOkButton cWhite, Ok ;SUNKEN EFFECT SHADOW
   Gui %v_EditGui%: Add, Text, x151 y120 w80 h15 BackgroundTrans Center vCancelEditSunkenS1 g_EDITGUICancelButton cWhite, Cancel ;SUNKEN EFFECT SHADOW
   Gui %v_EditGui%: Add, Text, x50 y118 w80 h15 BackgroundTrans 0x1000 Center vEditSunkenS2 g_EDITGUIOkButton cBlack, Ok ;SUNKEN EFFECT
   Gui %v_EditGui%: Add, Text, x150 y118 w80 h15 BackgroundTrans 0x1000 Center vCancelEditSunkenS2 g_EDITGUICancelButton cBlack, Cancel ;SUNKEN EFFECT
;BUTTONS NORMAL
   Gui %v_EditGui%: Add, Text, x51 y120 w80 h15 BackgroundTrans Center vEditNormalS1 g_EDITGUIOkButton cWhite, Ok ;SHADOW
   Gui %v_EditGui%: Add, Text, x151 y120 w80 h15 BackgroundTrans Center vCancelEditNormalS1 g_EDITGUICancelButton cWhite, Cancel ;SHADOW
   Gui %v_EditGui%: Add, Text, x50 y118 w80 h15 BackgroundTrans Center Border vEditNormalS2 g_EDITGUIOkButton cBlack, Ok
   Gui %v_EditGui%: Add, Text, x150 y118 w80 h15 BackgroundTrans Center Border vCancelEditNormalS2 g_EDITGUICancelButton cBlack, Cancel
;SHOW GUI
   Gui %v_EditGui%: Show,w280 h138, %v_EditGuiName%
   Gui %v_EditGui%: Color, White
   EDITWIN_ID := WinExist()
   WinSet Transparent, 230, ahk_id %EDITWIN_ID%
RETURN

;________EDIT GUI - BUTTONS____________________________|

;EDIT GUI - OK BUTTON EFFECT
_EDITGUIOkButton:
  ButtonEffect("EditNormalS1","EditNormalS2","_EDITGUIOk")
RETURN

;EDIT GUI - CANCEL BUTTON EFFECT
_EDITGUICancelButton:
  ButtonEffect("CancelEditNormalS1","CancelEditNormalS2","_EDITGUICancel")
RETURN

;EDIT GUI - SELECT BUTTON EFFECT
_EDITGUISelectButton:
  ButtonEffect("SelectedNormalS11","SelectedNormalS22","_EDITGUISelect")
RETURN

;________EDIT GUI - SUBS_______________________________|

;EDIT GUI - OK
_EDITGUIOk:
  RetrieveEditMovie = %E1%;%E2% ;GET DATA FROM BOTH COLUMNS
  FileRead WholeFile, %v_MovieList% ;READ MOVIELIST FILE
  GuiControlGet ED1 ; GET DATA FROM CONTROL
  GuiControlGet ED2 ; GET DATA FROM CONTROL
  StringReplace WholeFileWithoutMovie, WholeFile,%RetrieveEditMovie%,%ED1%;%ED2%, All ;FIND LINE AND REPLACE WITH NEW TEXT
  StringReplace WholeFileWithoutMovie, WholeFileWithoutMovie, `r`n`r`n, `r`n
  FileDelete %v_MovieList%
    If Errorlevel = 0
    {
      FileAppend %WholeFileWithoutMovie%, %v_MovieList%
      ;UPDATE CHANGES CODE MISSING
      ;LV_Modify(RowNumber, Options, NewCol1, NewCol2)
      TrayTip %v_ProgramName%, %E1% has been Changed Successfully!,,1
      SetTimer _RemoveTrayTip, 1800
    }   
    Else If Errorlevel = 1
    {
      TrayTip %v_ProgramName%, Error!`nThere was an Error with Editing %E1%!,,3
      SetTimer _RemoveTrayTip, 1800
    }
  Gui %v_EditGui%: Submit
;FREE MEMORY
  E1 =  
  E2 =   
RETURN

;EDIT GUI - CANCEL
_EDITGUICancel:
   Gui %v_EditGui%: Destroy
;FREE MEMORY
  E1 =  
  E2 =   
  ED1 =  
  ED2 = 
RETURN

;EDIT GUI - SELECT
_EDITGUISelect:
  FileSelectFile SelectedFile2, S, %A_ScriptDir%, Select Movie Path, Video Files (*.avi; *.wmv; *.mpg; *.divx; *.mov)
  if SelectedFile2 =
    {
      RETURN
    }
    Else
    {
      GuiControl %v_EditGui%: Text, ED2, %SelectedFile2%
    }
  SelectedFile2 = ;free memory
RETURN

;______________________________________________________.
;________DELETE GUI____________________________________|
;______________________________________________________|

_DELETEGUI:
   Gui %v_DelGui%: Destroy
   Gui %v_DelGui%: +LastFound +ToolWindow +Border -Caption -Theme +Owner
   Gui %v_DelGui%: Font, Bold, Arial
;GRADIENTS
   Gui %v_DelGui%: Add, Picture, x0 y0 w320 h15 , %A_WinDir%\Titlebar.bmp ;TITLE GRADIENT
   Gui %v_DelGui%: Add, Picture, x50 y118 w80 h15 , %A_WinDir%\Titlebar.bmp ;BUTTON 1 GRADIENT
   Gui %v_DelGui%: Add, Picture, x150 y118 w80 h15 , %A_WinDir%\Titlebar.bmp ;BUTTON 2 GRADIENT
;TITLE NAME
  Gui %v_DelGui%: Add, Text, x4 y1 w272 h15 Center BackgroundTrans g_GuiMove cWhite, %v_DelGuiName%
   Gui %v_DelGui%: Add, Text, x3 y0 w272 h15 Center BackgroundTrans g_GuiMove cBlack, %v_DelGuiName%
;FRAMES
   Gui %v_DelGui%: Add, GroupBox, x0 y-7 w280 h145 BackgroundTrans 0x8000, ;BIG FRAME
   Gui %v_DelGui%: Add, GroupBox, x0 y-7 w280 h23 BackgroundTrans 0x8000, ;TITLE FRAME
;TEXT
   Gui %v_DelGui%: Add, Text, x5 y20 w270 h15 Center cBlack, Are you sure you want to Delete :
   DSM := LV_GetNext("C")
   LV_GetText(DS1,DSM,1)
   LV_GetText(DS2,DSM,2)
    if DSM = 0
    {
      DS1 =
      DS2 = 
    }
   Gui %v_DelGui%: Add, Text, x5 y+5 w270 h15 Center cBlack, %DS1%
   Gui %v_DelGui%: Add, Text, x5 y+5 w270 h15 Center cBlack, ?
   Gui %v_DelGui%: Font, Norm, s6
   Gui %v_DelGui%: Add, Text, x5 y+10 w270 h25 Center BackgroundTrans cBlack, NOTE : This only Deletes the entry in the Movie List`nfile and not the actual Movie.
   Gui %v_DelGui%: Font, Bold, Arial
;BUTTONS SUNKEN
   Gui %v_DelGui%: Add, Text, x51 y120 w80 h15 BackgroundTrans Center vYesSunkenS1 g_DELETEGUIOkButton cWhite, Yes ;SUNKEN EFFECT SHADOW
   Gui %v_DelGui%: Add, Text, x151 y120 w80 h15 BackgroundTrans Center vNoSunkenS1 g_DELETEGUICancelButton cWhite, No ;SUNKEN EFFECT SHADOW
   Gui %v_DelGui%: Add, Text, x50 y118 w80 h15 BackgroundTrans 0x1000 Center vYesSunkenS2 g_DELETEGUIOkButton cBlack, Yes ;SUNKEN EFFECT
   Gui %v_DelGui%: Add, Text, x150 y118 w80 h15 BackgroundTrans 0x1000 Center vNoSunkenS2 g_DELETEGUICancelButton cBlack, No ;SUNKEN EFFECT
;BUTTONS NORMAL
   Gui %v_DelGui%: Add, Text, x51 y120 w80 h15 BackgroundTrans Center vYesNormalS1 g_DELETEGUIOkButton cWhite, Yes ;SHADOW
   Gui %v_DelGui%: Add, Text, x151 y120 w80 h15 BackgroundTrans Center vNoNormalS1 g_DELETEGUICancelButton cWhite, No ;SHADOW
   Gui %v_DelGui%: Add, Text, x50 y118 w80 h15 BackgroundTrans Center Border vYesNormalS2 g_DELETEGUIOkButton cBlack, Yes
   Gui %v_DelGui%: Add, Text, x150 y118 w80 h15 BackgroundTrans Center Border vNoNormalS2 g_DELETEGUICancelButton cBlack, No
;SHOW GUI
   Gui %v_DelGui%: Show,w280 h138, %v_DelGuiName%
   Gui %v_DelGui%: Color, White
   DELWIN_ID := WinExist()
   WinSet Transparent, 230, ahk_id %DELWIN_ID%
RETURN

;________DELETE GUI - BUTTONS__________________________|

;DELETE GUI - OK BUTTON EFFECT
_DELETEGUIOkButton:
  ButtonEffect("YesNormalS1","YesNormalS2","_DELETEGUIOk")
RETURN

;DELETE GUI - CANCEL BUTTON EFFECT
_DELETEGUICancelButton:
  ButtonEffect("NoNormalS1","NoNormalS2","_DELETEGUICancel")
RETURN

;________DELETE GUI - SUBS_____________________________|

;DELETE GUI - OK 
_DELETEGUIOk:
  if DS1 = 
  {
    TrayTip %v_ProgramName%, No Movie has been Selected!,,1
    SetTimer _RemoveTrayTip, 1800
    RETURN
  }
  Else
  {
  RetrieveMovie = %DS1%;%DS2% ;GET DATA FROM BOTH COLUMNS
  FileRead WholeFile, %v_MovieList% ;READ MOVIELIST FILE
  StringReplace WholeFileWithoutMovie, WholeFile,%RetrieveMovie%, , All ;FIND LINE AND REPLACE WITH NOTHING
  StringReplace WholeFileWithoutMovie, WholeFileWithoutMovie, `r`n`r`n, `r`n
  FileDelete %v_MovieList%
    If Errorlevel = 0
    {
      FileAppend %WholeFileWithoutMovie%, %v_MovieList%
      ControlGet RowHighlighted, List, Focused, SysListView321, %v_ProgramName%, 
      LV_Delete(RowHighlighted) ;not working properly
      TrayTip %v_ProgramName%, "%DS1%"`nhas been Deleted Successfully!,,1
      SetTimer _RemoveTrayTip, 1800
    }   
    Else If Errorlevel = 1
    {
      TrayTip %v_ProgramName%, Error!`n"%DS1%" could not be Deleted!,,3
      SetTimer _RemoveTrayTip, 1800
    }
  Gui %v_DelGui%: Submit
  RetrieveMovie := ;free memory
  }
RETURN

;DELETE GUI - CANCEL
_DELETEGUICancel:
  Gui %v_DelGui%: Destroy
RETURN

;______________________________________________________.
;________ABOUT GUI_____________________________________|
;______________________________________________________|

_ABOUTGUI:
   Gui %v_AboutGui%: Destroy
   LoadAboutGuiVars()
   Gui %v_AboutGui%: +LastFound +ToolWindow +Border -Caption +Owner
   Gui %v_AboutGui%: Margin, 0, 0
   Gui %v_AboutGui%: Font, Bold, Arial
;GRADIENT
   Gui %v_AboutGui%: Add, Picture, x-1 y-1 w160 h15 , %A_WinDir%\Titlebar.bmp ;TITLE GRADIENT
;TITLE NAME
   Gui %v_AboutGui%: Add, Text, x4 y1 w125 h15 Center BackgroundTrans g_GuiMove cWhite, %v_AboutGuiName% ;SHADOW
   Gui %v_AboutGui%: Add, Text, x3 y0 w125 h15 Center BackgroundTrans g_GuiMove cBlack, %v_AboutGuiName%
;TITLEBAR BUTTONS
   Gui %v_AboutGui%: Add, Text, x148 y2 w14 h15 BackgroundTrans g_ABOUTGUIClose cWhite,%A_Space%x ;SHADOW
   Gui %v_AboutGui%: Add, Text, x146 y0 w14 h15 BackgroundTrans g_ABOUTGUIClose Border cBlack,%A_Space%x
;FRAMES
   Gui %v_AboutGui%: Add, GroupBox, x0 y-7 w160 h102 BackgroundTrans 0x8000, ;BIG FRAME
   Gui %v_AboutGui%: Add, GroupBox, x0 y-7 w160 h23 BackgroundTrans 0x8000, ;TITLE FRAME
   Gui %v_AboutGui%: Add, GroupBox, x146 y-7 w14 h23 BackgroundTrans 0x8000, ;EXIT FRAME
;ABOUT INFO
   Gui %v_AboutGui%: Add, Picture, vAppIcon x5 y%YPos1% h16 w16 Icon204 , shell32.dll
   Gui %v_AboutGui%: Add, Text, vAppName x25, %v_ProgramName% %v_Version%
   Gui %v_AboutGui%: Add, Text, vAppAuthor x5 y%YPos2%, by Alex Sotirakis
   Gui %v_AboutGui%: Font, Norm
   Gui %v_AboutGui%: Add, Text, vCredits x5  y%YPos1%, %AboutText%
;SHOW GUI
   Gui %v_AboutGui%: Show, w160 h%WinH%, %v_AboutGuiName%
   Gui %v_AboutGui%: Color, White
   ABWIN_ID := WinExist()
   WinSet Transparent, 230, ahk_id %ABWIN_ID%
   TextScrolling()
RETURN

;ABOUT GUI - CLOSE BUTTON
_ABOUTGUIClose:
   Gui %v_AboutGui%: Destroy
RETURN

;________ABOUT GUI - VARIABLES_________________________|

LoadAboutGuiVars() {
Global
  WinH = 95            ; Height
  YPos1 := WinH  - 10  ; Bottom of GUI
  YPos2 := YPos1 + 15  ; Pixels Gap
  YPos3 := YPos2 + 20
;ABOUT GUI TEXT
AboutText =
(LTrim
Many thanks to all the people
who helped me coding this.`n
)
}

;________ABOUT GUI - SCROLL EFFECT_____________________|

TextScrolling() {
Global
Loop
{
   YPos1--
   GuiControl %v_AboutGui%: Move, AppIcon, y%YPos1%
   GuiControl %v_AboutGui%: Move, AppName, y%YPos1%
   YPos2--
   GuiControl %v_AboutGui%: Move, AppAuthor, y%YPos2%
   YPos3--
   GuiControl %v_AboutGui%: Move, Credits, y%YPos3%
   GuiControlGet Credits, %v_AboutGui%: Pos
   If (CreditsY + CreditsH < WinH)
      Break
   Sleep 40
}
}

;________GLOBAL - GUI MOVE_____________________________|

_GuiMove:
   PostMessage 0xA1, 2,,, A
RETURN

;________GLOBAL - BUTTON EFFECT________________________|

ButtonEffect( BV1, BV2, SubR) {
  Global
  GuiControl Hide, %BV1%
  GuiControl Hide, %BV2%
  Loop {
    MouseDown := GetKeyState("LButton","P")
    If (!MouseDown) {
       Click = 1
       Break
    }
  }
  GuiControl Show, %BV1%
  GuiControl Show, %BV2%
  IfEqual Click, 1, GoSub, %SubR%
  Click = 
}

;________GLOBAL - TRAY MENU____________________________|

TrayMenu() {
Global
   Menu("Tray","DeleteAll"), Menu("Tray","Nostandard"), Menu("Tray","Tip",v_ProgramName A_Space v_Version "`nby Alex Sotirakis"), Menu("Tray","Click",1)Menu("Tray","Click",1)
   Menu("Tray","Icon","Shell32.dll",204)
   Menu("Tray","Add","About","_ABOUTGUI"), Menu("Tray","Add"), Menu("Tray","Add","Hide","_Hide"), Menu("Tray","Add","Show","_Show"), Menu("Tray","Add"), Menu("Tray","Add","Reload","_Reload")
   if not A_IsCompiled
   {
    Menu("Tray","Add","Edit","_Edit")
   }
   Menu("Tray","Add"), Menu("Tray","Add","Exit","_Exit")
   Menu("Tray","Default","Show"), Menu("Tray","Disable","Show")
}

;________GLOBAL - MENU FUNCTION________________________|

Menu( MenuName, Cmd, P3="", P4="", P5="" ) {
  Menu, %MenuName%, %Cmd%, %P3%, %P4%, %P5%
RETURN ErrorLevel
}

;________GLOBAL - CREATE TITLEBAR______________________|

CreateTitleBar() {
Global
Titlebar =
(join
424d3e00000000000000360000002800000001000000020000000100180000000000080000000000000000000000000000000000000080808000ededed00
)
}

;________GLOBAL - IMAGE EMBEDDING FUNCTION_____________|

WriteFile(file,data) {
   Handle :=  DllCall("CreateFile","str",file,"Uint",0x40000000
                  ,"Uint",0,"UInt",0,"UInt",4,"Uint",0,"UInt",0)
   Loop
   {
     if strlen(data) = 0
        break
     StringLeft, Hex, data, 2         
     StringTrimLeft, data, data, 2 
     Hex = 0x%Hex%
     DllCall("WriteFile","UInt", Handle,"UChar *", Hex
     ,"UInt",1,"UInt *",UnusedVariable,"UInt",0)
    }
   DllCall("CloseHandle", "Uint", Handle)
RETURN
}

;________GLOBAL - REMOVE TRAYTIP_______________________|

_RemoveTrayTip:
   SetTimer _RemoveTrayTip, Off
   TrayTip
RETURN

;________END___________________________________________|


all you need to do now is go to the MAIN - GUI PAUSE section and add the code you want to be run when pressing the button
QuickSubs | Popcorn Movie Catalog
All my scripts are just in AutoHotkey v1.0.48.05

SoggyDog
  • Members
  • 803 posts
  • Last active: Mar 04 2013 06:27 AM
  • Joined: 02 May 2006
Might I suggest updating the top post with the most current code?...
It makes finding the latest-and-greatest a lot easier, especially as this thread continues to grow.

Delusion
  • Members
  • 272 posts
  • Last active: Jul 13 2014 09:04 PM
  • Joined: 16 Jul 2008

Might I suggest updating the top post with the most current code?...
It makes finding the latest-and-greatest a lot easier, especially as this thread continues to grow.


the code on the top is the most current one...the one i posted for deportivo5 is just for him...im not planning to add a pause button...i find it useless
QuickSubs | Popcorn Movie Catalog
All my scripts are just in AutoHotkey v1.0.48.05

SoggyDog
  • Members
  • 803 posts
  • Last active: Mar 04 2013 06:27 AM
  • Joined: 02 May 2006

the code on the top is the most current one...the one i posted for deportivo5 is just for him...im not planning to add a pause button...i find it useless


Good enough... Thanks.