├── source ├── get stripper au3.cmd ├── stripper command.txt ├── helper2.ico ├── helper3.ico ├── Webdriver.chm ├── Webdriver.chw ├── Stash_Helper.isn ├── gallery │ ├── lg.ttf │ ├── lg.woff │ ├── script.js │ ├── testgallery3.html │ ├── testgallery2.html │ └── lg.svg ├── Images │ ├── helper2.ico │ ├── icons │ │ ├── 0.bmp │ │ ├── 1.bmp │ │ ├── 2.bmp │ │ ├── 3.bmp │ │ ├── 4.bmp │ │ ├── 5.bmp │ │ ├── 6.bmp │ │ ├── 7.bmp │ │ ├── 8.bmp │ │ ├── 9.bmp │ │ ├── 10.bmp │ │ ├── 11.bmp │ │ ├── 12.bmp │ │ ├── 13.bmp │ │ ├── 14.bmp │ │ ├── 15.bmp │ │ ├── 16.bmp │ │ ├── 17.bmp │ │ ├── 18.bmp │ │ ├── 19.bmp │ │ └── 20.bmp │ ├── crowbar_50px.png │ ├── search_50px.png │ ├── toolbox_50px.png │ ├── transfer_24px.png │ ├── transfer_50px.png │ ├── add_bookmark_50px.png │ ├── css_filetype_26px.png │ ├── maintenance_50px.png │ ├── browse_folder_50px.png │ ├── image_gallery_50px.png │ ├── opened_folder_50px.png │ ├── photo_gallery_50px.png │ ├── play_property_30px.png │ ├── play_property_50px.png │ ├── full_tool_storage_box_50px.png │ └── girl-with-glasses-product-box.png ├── release │ ├── AutoIt3.exe │ ├── helper1.ico │ ├── helper2.ico │ ├── AutoIt3_x64.exe │ ├── gallery │ │ ├── lg.ttf │ │ ├── lg.woff │ │ ├── script.js │ │ └── lg.svg │ ├── Images │ │ └── icons │ │ │ ├── 0.bmp │ │ │ ├── 1.bmp │ │ │ ├── 2.bmp │ │ │ ├── 3.bmp │ │ │ ├── 4.bmp │ │ │ ├── 5.bmp │ │ │ ├── 6.bmp │ │ │ ├── 7.bmp │ │ │ ├── 8.bmp │ │ │ ├── 9.bmp │ │ │ ├── 10.bmp │ │ │ ├── 11.bmp │ │ │ ├── 12.bmp │ │ │ ├── 13.bmp │ │ │ ├── 14.bmp │ │ │ ├── 15.bmp │ │ │ ├── 16.bmp │ │ │ ├── 17.bmp │ │ │ ├── 18.bmp │ │ │ ├── 19.bmp │ │ │ └── 20.bmp │ ├── Stash_Helper.a3x │ ├── Stash_Helper_SetupV2.4.13.exe │ ├── Installer Constants.txt │ └── Installer Project.ifp ├── au3WebDriver-1.3.1.zip ├── au3Stripper │ └── AU3Stripper.exe ├── Forms │ ├── test.isf │ ├── Extra Tools.isf │ ├── CopySceneInfo.au3 │ ├── CustomizeForm.au3 │ ├── Custom.isf │ ├── MetroPopUpMenu.au3 │ ├── MetroPopup.isf │ ├── ManagePlayList.isf │ ├── ManagePlayListForm.au3 │ ├── Merge2Performers.isf │ ├── Scene2Movie.isf │ ├── Scrapers.isf │ ├── CopySceneInfo.isf │ ├── InitialSettingsForm.au3 │ └── SceneToMovieForm.au3 ├── Changlog.txt ├── api │ └── au3.autoit3wrapper.api ├── gallery.html ├── SimpleMsgBox.au3 ├── _GUIDisable.au3 ├── URL_Json_Encode.au3 ├── CurrentImagesViewer.au3 ├── TrayMenuEx.au3 ├── wd_cdp.au3 └── Backup │ └── wd_cdp.au3 ├── .gitattributes ├── .gitignore └── LICENSE /source/get stripper au3.cmd: -------------------------------------------------------------------------------- 1 | au3Stripper\au3Stripper.exe Stash_Helper.au3 /MO -------------------------------------------------------------------------------- /source/stripper command.txt: -------------------------------------------------------------------------------- 1 | au3Stripper\au3Stripper.exe Stash_Helper.au3 /MO -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /source/helper2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/helper2.ico -------------------------------------------------------------------------------- /source/helper3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/helper3.ico -------------------------------------------------------------------------------- /source/Webdriver.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Webdriver.chm -------------------------------------------------------------------------------- /source/Webdriver.chw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Webdriver.chw -------------------------------------------------------------------------------- /source/Stash_Helper.isn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Stash_Helper.isn -------------------------------------------------------------------------------- /source/gallery/lg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/gallery/lg.ttf -------------------------------------------------------------------------------- /source/gallery/lg.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/gallery/lg.woff -------------------------------------------------------------------------------- /source/Images/helper2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/helper2.ico -------------------------------------------------------------------------------- /source/Images/icons/0.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/0.bmp -------------------------------------------------------------------------------- /source/Images/icons/1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/1.bmp -------------------------------------------------------------------------------- /source/Images/icons/2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/2.bmp -------------------------------------------------------------------------------- /source/Images/icons/3.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/3.bmp -------------------------------------------------------------------------------- /source/Images/icons/4.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/4.bmp -------------------------------------------------------------------------------- /source/Images/icons/5.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/5.bmp -------------------------------------------------------------------------------- /source/Images/icons/6.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/6.bmp -------------------------------------------------------------------------------- /source/Images/icons/7.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/7.bmp -------------------------------------------------------------------------------- /source/Images/icons/8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/8.bmp -------------------------------------------------------------------------------- /source/Images/icons/9.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/9.bmp -------------------------------------------------------------------------------- /source/gallery/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/gallery/script.js -------------------------------------------------------------------------------- /source/Images/icons/10.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/10.bmp -------------------------------------------------------------------------------- /source/Images/icons/11.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/11.bmp -------------------------------------------------------------------------------- /source/Images/icons/12.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/12.bmp -------------------------------------------------------------------------------- /source/Images/icons/13.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/13.bmp -------------------------------------------------------------------------------- /source/Images/icons/14.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/14.bmp -------------------------------------------------------------------------------- /source/Images/icons/15.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/15.bmp -------------------------------------------------------------------------------- /source/Images/icons/16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/16.bmp -------------------------------------------------------------------------------- /source/Images/icons/17.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/17.bmp -------------------------------------------------------------------------------- /source/Images/icons/18.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/18.bmp -------------------------------------------------------------------------------- /source/Images/icons/19.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/19.bmp -------------------------------------------------------------------------------- /source/Images/icons/20.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/icons/20.bmp -------------------------------------------------------------------------------- /source/release/AutoIt3.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/AutoIt3.exe -------------------------------------------------------------------------------- /source/release/helper1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/helper1.ico -------------------------------------------------------------------------------- /source/release/helper2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/helper2.ico -------------------------------------------------------------------------------- /source/Images/crowbar_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/crowbar_50px.png -------------------------------------------------------------------------------- /source/Images/search_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/search_50px.png -------------------------------------------------------------------------------- /source/Images/toolbox_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/toolbox_50px.png -------------------------------------------------------------------------------- /source/au3WebDriver-1.3.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/au3WebDriver-1.3.1.zip -------------------------------------------------------------------------------- /source/release/AutoIt3_x64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/AutoIt3_x64.exe -------------------------------------------------------------------------------- /source/release/gallery/lg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/gallery/lg.ttf -------------------------------------------------------------------------------- /source/release/gallery/lg.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/gallery/lg.woff -------------------------------------------------------------------------------- /source/Images/transfer_24px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/transfer_24px.png -------------------------------------------------------------------------------- /source/Images/transfer_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/transfer_50px.png -------------------------------------------------------------------------------- /source/release/Images/icons/0.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/0.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/1.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/2.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/3.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/3.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/4.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/4.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/5.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/5.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/6.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/6.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/7.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/7.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/8.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/9.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/9.bmp -------------------------------------------------------------------------------- /source/release/Stash_Helper.a3x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Stash_Helper.a3x -------------------------------------------------------------------------------- /source/release/gallery/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/gallery/script.js -------------------------------------------------------------------------------- /source/Images/add_bookmark_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/add_bookmark_50px.png -------------------------------------------------------------------------------- /source/Images/css_filetype_26px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/css_filetype_26px.png -------------------------------------------------------------------------------- /source/Images/maintenance_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/maintenance_50px.png -------------------------------------------------------------------------------- /source/au3Stripper/AU3Stripper.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/au3Stripper/AU3Stripper.exe -------------------------------------------------------------------------------- /source/release/Images/icons/10.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/10.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/11.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/11.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/12.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/12.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/13.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/13.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/14.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/14.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/15.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/15.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/16.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/17.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/17.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/18.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/18.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/19.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/19.bmp -------------------------------------------------------------------------------- /source/release/Images/icons/20.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Images/icons/20.bmp -------------------------------------------------------------------------------- /source/Images/browse_folder_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/browse_folder_50px.png -------------------------------------------------------------------------------- /source/Images/image_gallery_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/image_gallery_50px.png -------------------------------------------------------------------------------- /source/Images/opened_folder_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/opened_folder_50px.png -------------------------------------------------------------------------------- /source/Images/photo_gallery_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/photo_gallery_50px.png -------------------------------------------------------------------------------- /source/Images/play_property_30px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/play_property_30px.png -------------------------------------------------------------------------------- /source/Images/play_property_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/play_property_50px.png -------------------------------------------------------------------------------- /source/Images/full_tool_storage_box_50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/full_tool_storage_box_50px.png -------------------------------------------------------------------------------- /source/release/Stash_Helper_SetupV2.4.13.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/release/Stash_Helper_SetupV2.4.13.exe -------------------------------------------------------------------------------- /source/Images/girl-with-glasses-product-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philpw99/Stash_Helper/HEAD/source/Images/girl-with-glasses-product-box.png -------------------------------------------------------------------------------- /source/Forms/test.isf: -------------------------------------------------------------------------------- 1 | #cs 2 | [gui] 3 | title=test 4 | breite=350 5 | hoehe=350 6 | style=-1 7 | exstyle=-1 8 | bgcolour=0xF0F0F0 9 | bgimage=none 10 | handle=test 11 | #ce 12 | 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Build and Release Folders 2 | bin-debug/ 3 | bin-release/ 4 | [Oo]bj/ 5 | [Bb]in/ 6 | 7 | # Other files and folders 8 | .settings/ 9 | 10 | # Executables 11 | *.swf 12 | *.air 13 | *.ipa 14 | *.apk 15 | 16 | # Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` 17 | # should NOT be excluded as they contain compiler settings and other important 18 | # information for Eclipse / Flash Builder. 19 | -------------------------------------------------------------------------------- /source/release/Installer Constants.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 philpw99 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /source/Changlog.txt: -------------------------------------------------------------------------------- 1 | v2.4.7 2 | * Change Middle Mouse Button to show a mini menu in browser. 3 | * Remember the last visited page and open it next time Stash Helper runs. Can disable it in the settings. 4 | * Set a 2 second limit between clicks, to prevent mouse wheel button from clicking too many times. 5 | * Fix Stash console not showing problem. Also fix stash console not closing when exit. 6 | * Improve the GetURL and OpenURL ( for the 10th+ time). 7 | * Fix Firefox "w3c" wrong argument issue. 8 | * Add x64 AutoIt shortcut. 9 | 10 | v2.4.6 11 | * Auto download the py_common folder and files in Scraper Manager. 12 | * Add Opera as an option in the first time setup. 13 | * Better way to know if the current browser tab is in the front. 14 | * Fix a big bug of URLtoQuery. Now the playlist and play current scene/movie works normally. 15 | * Now you can use middle-mouse-button to play the current scene/movie/image/gallery, or Ctrl-MidMouseButton to add scene/movie/image/gallery to the playlist. 16 | 17 | v2.4.5 18 | * Update Webdriver to 0.11. 19 | * Use wd_capabilities.au3 instead of manually built strings. 20 | * Add Opera as an option for browsers. 21 | * Improvement of running in default profile. -------------------------------------------------------------------------------- /source/Forms/Extra Tools.isf: -------------------------------------------------------------------------------- 1 | ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; 2 | #include 3 | #include 4 | #include 5 | #Include 6 | 7 | $Extra_Tools = GUICreate("Extra Tools",837,901,-1,-1,-1,-1) 8 | GUICtrlCreateLabel("If your scenes have duplicate file entries like"&@crlf&"'G:myfolder\\myfile.mp4' and 'G:\\myfolder\\myfile.mp4',"&@crlf&"you can use this function to get rid of them all in once.",60,80,689,214,-1,-1) 9 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 10 | GUICtrlSetBkColor(-1,"-2") 11 | 12 | 13 | 14 | #cs 15 | [gui] 16 | Handle_deklaration=default 17 | Handle_deklaration_const=default 18 | title=Extra Tools 19 | breite=837 20 | hoehe=901 21 | style=-1 22 | exstyle=-1 23 | bgcolour=0xF0F0F0 24 | bgimage=none 25 | handle=Extra_Tools 26 | parent= 27 | code= 28 | codebeforegui= 29 | xpos=-1 30 | ypos=-1 31 | center_gui=true 32 | title_textmode=normal 33 | isf_include_once=false 34 | only_controls_in_isf=false 35 | const_modus=default 36 | gui_code_in_function=false 37 | gui_code_in_function_name= 38 | gui_event_close= 39 | gui_event_minimize= 40 | gui_event_restore= 41 | gui_event_maximize= 42 | gui_event_mousemove= 43 | gui_event_primarydown= 44 | gui_event_primaryup= 45 | gui_event_secoundarydown= 46 | gui_event_secoundaryup= 47 | gui_event_resized= 48 | gui_event_dropped= 49 | defaultfont=MS Sans Serif 50 | defaultfontsize=8 51 | [0x000724CC] 52 | type=label 53 | handle=433 54 | locked=0 55 | resize= 56 | x=60 57 | y=80 58 | width=689 59 | height=214 60 | func= 61 | font=Tahoma 62 | fontsize=12 63 | fontstyle=400 64 | fontattribute=0 65 | tooltip= 66 | bgimage= 67 | textcolour=0x000000 68 | id= 69 | text=If your scenes have duplicate file entries like[BREAK]'G:myfolder\\myfile.mp4' and 'G:\\myfolder\\myfile.mp4',[BREAK]you can use this function to get rid of them all in once. 70 | state=$GUI_SHOW+$GUI_ENABLE 71 | style= 72 | exstyle= 73 | bgcolour=-2 74 | code= 75 | order=0 76 | tabpage=-1 77 | iconindex= 78 | iconlarge=0 79 | textmode=text 80 | #ce 81 | -------------------------------------------------------------------------------- /source/Forms/CopySceneInfo.au3: -------------------------------------------------------------------------------- 1 | #include "CopySceneInfo.isf" 2 | 3 | Func CopySceneInfo() 4 | ; Global $mInfo 5 | 6 | Local $sURL = _WD_Action($sSession, "url") 7 | Local $nScene = GetNumber($sURL, "scenes") 8 | If @error Then 9 | MsgBox(48,"Not A Scene Page","The current webpage showing: " & @CRLF _ 10 | & $sURL & @CRLF & "is not a scene's URL.",0) 11 | Return SetError(2) 12 | EndIf 13 | ; Get Scene info will set the global $mInfo 14 | GetSceneInfo($nScene) 15 | If @error Then Return SetError(3) 16 | 17 | ; Now $mInfo should have the current scene info 18 | 19 | ; Create the gui and show 20 | Local $mGui = _guiCopySceneInfo() 21 | GUICtrlSetData( $mGui["lbCurrentSceneID"], "Current Scene ID: " & $mInfo.Item("SceneID") ) 22 | GUICtrlSetData( $mGui["lbCurrentTitle"], "Current Title: " & $mInfo.Item("Title") ) 23 | 24 | ; Retrieve value here from the map. Map is slow for loops. 25 | Local $btnCancel = $mGui["btnCancel"], $btnOK = $mGui["btnOK"], $btnGetInfo = $mGui["btnGetInfo"] 26 | Local $lvSceneValues = $mGui["lvSceneValues"] 27 | 28 | ; Set List view column width 29 | _GUICtrlListView_SetColumnWidth( $lvSceneValues, 0, 40 ) ; # 30 | _GUICtrlListView_SetColumnWidth( $lvSceneValues, 1, 200 ) ; Property 31 | _GUICtrlListView_SetColumnWidth( $lvSceneValues, 2, 450 ) ; Value 32 | 33 | GUISetState( @SW_SHOW, $mGui["guiCopySceneInfo"] ) 34 | 35 | ; Message loop for GUI 36 | While True 37 | Switch GUIGetMsg() 38 | 39 | Case $GUI_EVENT_CLOSE, $btnCancel 40 | ExitLoop 41 | 42 | Case $btnGetInfo 43 | Local $nNum = GUICtrlRead( $mGui["inputSceneID"]) 44 | If Not StringIsDigit($nNum) Then 45 | MsgBox(48,"Scene ID should be a number","Please put in a number for the scene ID.",0) 46 | ContinueLoop 47 | EndIf 48 | SetSceneInfoToListView($lvSceneValues, $nNum) 49 | MsgBox(262192,"Under construction","This feature is surprisingly complicated. Need more time to work on it.",0) 50 | 51 | Case $btnOK 52 | MsgBox(262192,"Under construction","This feature is surprisingly complicated. Need more time to work on it.",0) 53 | 54 | EndSwitch 55 | 56 | Wend 57 | 58 | GUIDelete() 59 | 60 | EndFunc 61 | 62 | Func SetSceneInfoToListView($lvScene, $nNum) 63 | ; $nNum should be the scene id number 64 | $nNum = StringStripWS($nNum, 8) 65 | GetSceneInfo($nNum) 66 | If @error Then Return SetError(1) 67 | 68 | 69 | 70 | EndFunc 71 | 72 | -------------------------------------------------------------------------------- /source/api/au3.autoit3wrapper.api: -------------------------------------------------------------------------------- 1 | #AutoIt3Wrapper_Add_Constants?1 2 | #AutoIt3Wrapper_Au3Check_Parameters?1 3 | #AutoIt3Wrapper_Au3Check_Stop_OnWarning?1 4 | #AutoIt3Wrapper_Au3stripper_Stop_OnError?1 5 | #AutoIt3Wrapper_AutoIt3Dir?1 6 | #AutoIt3Wrapper_Aut2Exe?1 7 | #AutoIt3Wrapper_AutoIt3?1 8 | #AutoIt3Wrapper_Change2CUI?1 9 | #AutoIt3Wrapper_Compile_Both?1 10 | #AutoIt3Wrapper_Compression?1 11 | #AutoIt3wrapper_EndIf?1 12 | #AutoIt3Wrapper_Icon?1 13 | #AutoIt3wrapper_If_Compile?1 14 | #AutoIt3wrapper_If_Run?1 15 | #Autoit3wrapper_Jump_to_First_Error?1 16 | #AutoIt3Wrapper_OutFile?1 17 | #AutoIt3Wrapper_OutFile_Type?1 18 | #AutoIt3Wrapper_OutFile_X64?1 19 | #AutoIt3Wrapper_PlugIn_Funcs?1 20 | #AutoIt3Wrapper_Res_Comment?1 21 | #AutoIt3Wrapper_Res_CompanyName?1 22 | #Autoit3Wrapper_Res_Compatibility?1 23 | #AutoIt3Wrapper_Res_Cursor_Add?1 24 | #AutoIt3Wrapper_Res_Description?1 25 | #AutoIt3Wrapper_Res_Field?1 26 | #AutoIt3Wrapper_Res_File_Add?1 27 | #AutoIt3Wrapper_Res_FileVersion?1 28 | #AutoIt3Wrapper_Res_FileVersion_AutoIncrement?1 29 | #AutoIt3Wrapper_Res_Fileversion_First_Increment?1 30 | #AutoIt3Wrapper_Res_HiDpi?1 31 | #AutoIt3Wrapper_Res_Icon_Add?1 32 | #AutoIt3Wrapper_Res_Language?1 33 | #AutoIt3Wrapper_Res_LegalCopyright?1 34 | #AutoIt3Wrapper_Res_LegalTrademarks?1 35 | #AutoIt3Wrapper_Res_ProductName?1 36 | #AutoIt3Wrapper_Res_ProductVersion?1 37 | #AutoIt3Wrapper_Res_requestedExecutionLevel?1 38 | #AutoIt3Wrapper_Res_Remove?1 39 | #AutoIt3Wrapper_Res_SaveSource?1 40 | #AutoIt3Wrapper_Run_Stop_OnError?1 41 | #AutoIt3Wrapper_Run_After?1 42 | #AutoIt3Wrapper_Run_After_Admin?1 43 | #AutoIt3Wrapper_Run_Au3Check?1 44 | #AutoIt3Wrapper_Run_Au3Stripper?1 45 | #AutoIt3Wrapper_Run_Before?1 46 | #AutoIt3Wrapper_Run_Before_Admin?1 47 | #AutoIt3Wrapper_Run_Debug?1 48 | #AutoIt3Wrapper_Run_Debug_Mode?1 49 | #AutoIt3Wrapper_Run_SciTE_Minimized?1 50 | #AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized?1 51 | #AutoIt3Wrapper_Run_Tidy?1 52 | #AutoIt3Wrapper_ShowGUI?1 53 | #AutoIt3Wrapper_ShowProgress?1 54 | #AutoIt3Wrapper_Testing?1 55 | #AutoIt3Wrapper_Tidy_Stop_OnError?1 56 | #AutoIt3Wrapper_UPX_Parameters?1 57 | #AutoIt3Wrapper_UseUPX?1 58 | #AutoIt3Wrapper_UseX64?1 59 | #AutoIt3Wrapper_Version?1 60 | #AutoIt3Wrapper_Versioning?1 61 | #AutoIt3Wrapper_Versioning_Parameters?1 62 | #Au3Stripper_Ignore_Funcs?1 63 | #Au3Stripper_Ignore_Variables?1 64 | #Au3Stripper_Off?1 65 | #Au3Stripper_On?1 66 | #Au3Stripper_AlwaysStrip_Off?1 67 | #Au3Stripper_AlwaysStrip_On?1 68 | #Au3Stripper_Parameters?1 69 | #Tidy_Off?1 70 | #Tidy_On?1 71 | #Tidy_Parameters?1 72 | #Tidy_ILC_Pos?1 73 | -------------------------------------------------------------------------------- /source/gallery.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Test Light gallery 4 | 5 | 6 | 21 | 22 | 23 | 24 | 25 | 62 | 63 | 70 | 71 | -------------------------------------------------------------------------------- /source/gallery/testgallery3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Test Light gallery 4 | 5 | 6 | 21 | 22 | 23 | 24 | 25 | 62 | 63 | 70 | 71 | -------------------------------------------------------------------------------- /source/gallery/testgallery2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Test Light gallery 4 | 5 | 6 | 7 | 8 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 66 | 67 | 74 | 75 | -------------------------------------------------------------------------------- /source/release/Installer Project.ifp: -------------------------------------------------------------------------------- 1 | 2 | [Header] 3 | ProjectFileVersion = 1.1 4 | [General] 5 | Program name = Stash Helper 6 | Program version = 2.4.13 7 | Windows XP = 0 8 | Windows Server 2003 = 0 9 | Windows Vista = 1 10 | Windows Server 2008 = 1 11 | Windows 7 = 1 12 | Windows 8 = 1 13 | Windows 10 = 1 14 | Windows Server 2016 = 1 15 | Windows Server 2019 = 0 16 | Windows Server 2022 = 0 17 | Windows 11 = 0 18 | DoNotCheckOS = 1 19 | Company name = 20 | Website = https://github.com/philpw99/Stash_Helper 21 | SFA = 0 22 | DFA = 0 23 | Comp = 1 24 | [Graphics] 25 | Wizard image =
26 | Header image =
27 | Show Label = 1 28 | VisualStylesEnabled = 1 29 | [Files] 30 | Installation path = \\ 31 | Autcip = 0 32 | [Uninstall] 33 | Vwau = 0 34 | Website = https:// 35 | Include uninstaller = 1 36 | Uninstaller filename = Uninstall 37 | UseCustomDisplayIcon = 1 38 | CustomDisplayIcon = \helper2.ico 39 | [Licence] 40 | Licence dialog = 0 41 | [Finish] 42 | Sart program = 0 43 | Reboot computer = 0 44 | Program = \ 45 | ProgramArguments = 46 | [Shortcuts] 47 | Allowtc = 0 48 | Shortcut path = \ 49 | [Serialoptions] 50 | Allows = 0 51 | Number = 1000 52 | Mask = #####-#####-#####-##### 53 | [SplashScreen] 54 | Image = 55 | Sound = 56 | Time = 2 57 | PlaySound = 0 58 | Allow = 0 59 | [Build] 60 | File = C:\Users\Philip\Documents\GitHub\Stash_Helper\source\release\Stash_Helper_Setup.exe 61 | SetupIconPath = C:\Program Files (x86)\solicus\InstallForge\icons\modern.ico 62 | UninstallIconPath = C:\Program Files (x86)\solicus\InstallForge\icons\modern.ico 63 | CompressionMethod = 0 64 | CompressionLevel = 2 65 | [Updater] 66 | Allow = 0 67 | 1 = 68 | 2 = 69 | 3 = http:// 70 | 4 = http:// 71 | 5 = http:// 72 | 6 = Update 73 | Language = 0 74 | RunProg = 75 | RunProgs = 0 76 | Execdlls = 0 77 | [Languages] 78 | 2 79 | [Files/Dirs] 80 | C:\Users\Philip\Documents\GitHub\Stash_Helper\source\release\AutoIt3.exe 81 | 872.7 KB 82 | exe 83 | C:\Users\Philip\Documents\GitHub\Stash_Helper\source\release\helper1.ico 84 | 7.2 KB 85 | ico 86 | C:\Users\Philip\Documents\GitHub\Stash_Helper\source\release\Stash_Helper.a3x 87 | 472.9 KB 88 | a3x 89 | C:\Users\Philip\Documents\GitHub\Stash_Helper\source\release\helper2.ico 90 | 30.9 KB 91 | ico 92 | C:\Users\Philip\Documents\GitHub\Stash_Helper\source\release\Images 93 | N/A 94 | [Folder] 95 | C:\Users\Philip\Documents\GitHub\Stash_Helper\source\release\gallery\ 96 | N/A 97 | [Folder] 98 | C:\Users\Philip\Documents\GitHub\Stash_Helper\source\release\AutoIt3_x64.exe 99 | 1 MB 100 | exe 101 | [Licence_Begin] 102 | 162 103 | {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}} 104 | {\*\generator Riched20 10.0.22000}\viewkind4\uc1 105 | \pard\fs20\par 106 | } 107 | [Licence_End] 108 | [Registry] 109 | [Variables] 110 | [SCs] 111 | Desktop 112 | Stash_Helper 113 | \AutoIt3.exe 114 | Stash_Helper.a3x 115 | \helper2.ico 116 | 0 117 | Startmenu 118 | Stash_Helper 119 | \AutoIt3.exe 120 | Stash_Helper.a3x 121 | \helper2.ico 122 | 0 123 | Desktop 124 | Stash_Helper_x64 125 | \AutoIt3_x64.exe 126 | Stash_Helper.a3x 127 | \helper2.ico 128 | 0 129 | Startmenu 130 | Stash_Helper_x64 131 | \AutoIt3_x64.exe 132 | Stash_Helper.a3x 133 | \helper2.ico 134 | 0 135 | [IFP_End] 136 | [Serials] 137 | [Serials_End] 138 | [Commands] 139 | -------------------------------------------------------------------------------- /source/SimpleMsgBox.au3: -------------------------------------------------------------------------------- 1 | ;SimpleMsgBox.au3 2 | 3 | ;=========================================================================================== 4 | ; 5 | ; Usage: _DisplayMsg($text,$button,[msgwidth,[msgheight,[msgxpos,[msgypos]]]]) 6 | ; 7 | ; Where: 8 | ; $text = The text to be displayed. Long lines will wrap. The text will also 9 | ; be centered. 10 | ; $button = The text for the buttons. Seperate buttons with the 11 | ; pipe (|) character. To set a button as the default button, 12 | ; place the ampersand (&) character before the word. If you 13 | ; put more than 1 ampersand character, the function will 14 | ; fail and return -1, plus set @error to 1 15 | ; msgwidth = Width of the displayed window. This value will be automatically 16 | ; increased if the resulting window will not be wide enough to 17 | ; accommodate the buttons requested. Default is 250 18 | ; msgheight = Height of the displayed window. This is not adjusted. If the 19 | ; text is too big, it will not display it all. Default is 80 20 | ; msgxpos = Where you want the window positioned horizontally. Default is centered. 21 | ; msgypos = Where you want the window positioned vertically. Default is centered. 22 | ; 23 | ; hParent = The parent GUI 24 | ; Success: Returns the button pressed, starting at 1, counting from the LEFT. 25 | ; Failure: Returns 0 if more than 1 default button is set, or an error with the window 26 | ; occurs. 27 | ; 28 | ;=========================================================================================== 29 | ; #include 30 | 31 | Func _SimpleMsgBox($text, $button,$msgwidth=300, $msgheight=120, $msgxpos=-1,$msgypos=-1 ) 32 | ; Global $gdScale. 33 | $msgwidth *= $gdScale 34 | $msgheight *= $gdScale 35 | Local $buttonarray,$msgbutton[5]=[1,1,1,1,1],$buttoncount,$defbutton=0 36 | If StringInStr($button,"&",0,2)<>0 Then 37 | SetError(1) 38 | Return 0 39 | EndIf 40 | $buttonarray=StringSplit($button,"|") 41 | If $buttonarray[0]>5 Then $buttonarray[0]=5 42 | If 88*$buttonarray[0] * $gdScale +8 > $msgwidth Then 43 | $msgwidth=88*$buttonarray[0] * $gdScale + 8 44 | EndIf 45 | $msggui = GUICreate("", $msgwidth, $msgheight, $msgxpos, $msgypos, $WS_popup + $WS_DLGframe, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) 46 | If $msggui=0 Then Return 0 47 | GUICtrlCreateLabel($text, 8, 8, $msgwidth-16, $msgheight-40, $SS_CENTER) 48 | $buttonxpos=(($msgwidth/$buttonarray[0])-80 * $gdScale)/2 49 | For $buttoncount=0 To $buttonarray[0]-1 50 | $buttonwork=$buttonarray[$buttoncount+1] 51 | If StringLeft($buttonwork,1)="&" Then 52 | $defbutton=$BS_DEFPUSHBUTTON 53 | $buttonarray[$buttoncount+1]="[ " & StringTrimLeft($buttonwork,1) & " ]" 54 | EndIf 55 | $msgbutton[$buttoncount] = GUICtrlCreateButton($buttonarray[$buttoncount+1], $buttonxpos+($buttoncount*80 * $gdScale)+($buttoncount*$buttonxpos*2), $msgheight-32 * $gdScale, 80 * $gdScale, 24 * $gdScale,$defbutton) 56 | $defbutton=0 57 | Next 58 | GUISetState() 59 | While 1 60 | $mmsg = GUIGetMsg() 61 | Select 62 | Case $mmsg = $msgbutton[0] 63 | GUIDelete($msggui) 64 | Return 1 65 | Case $mmsg = $msgbutton[1] 66 | GUIDelete($msggui) 67 | Return 2 68 | Case $mmsg = $msgbutton[2] 69 | GUIDelete($msggui) 70 | Return 3 71 | Case $mmsg = $msgbutton[3] 72 | GUIDelete($msggui) 73 | Return 4 74 | Case $mmsg = $msgbutton[4] 75 | GUIDelete($msggui) 76 | Return 5 77 | EndSelect 78 | WEnd 79 | EndFunc -------------------------------------------------------------------------------- /source/_GUIDisable.au3: -------------------------------------------------------------------------------- 1 | #include-once 2 | 3 | ; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 4 | ; #INDEX# ======================================================================================================================= 5 | ; Title .........: _GUIDisable 6 | ; AutoIt Version : v3.2.2.0 or higher 7 | ; Language ......: English 8 | ; Description ...: Creates a dimming effect on the current/selected GUI. 9 | ; Note ..........: 10 | ; Author(s) .....: guinness 11 | ; Remarks .......: Thanks to supersonic for the idea of adjusting the UDF when using Classic themes in Windows Vista+. 12 | ; =============================================================================================================================== 13 | 14 | ; #INCLUDES# ==================================================================================================================== 15 | #include 16 | #include 17 | #include 18 | 19 | ; #GLOBAL VARIABLES# ============================================================================================================ 20 | Global Enum $__hGUIDisableHWnd, $__hGUIDisableHWndPrevious, $__iGUIDisableMax 21 | Global $__aGUIDisable[$__iGUIDisableMax] 22 | 23 | Func _GUIDisable($hWnd, $iAnimate = Default, $iBrightness = Default, $bColor = 0x000000) 24 | Local Const $AW_SLIDE_IN_TOP = 0x00040004, $AW_SLIDE_OUT_TOP = 0x00050008 25 | 26 | If $iAnimate = Default Then 27 | $iAnimate = 1 28 | EndIf 29 | If $iBrightness = Default Then 30 | $iBrightness = 5 31 | EndIf 32 | 33 | If $hWnd = -1 And $__aGUIDisable[$__hGUIDisableHWnd] = 0 Then 34 | Local $iLabel = GUICtrlCreateLabel('', -99, -99, 1, 1) 35 | $hWnd = _WinAPI_GetParent(GUICtrlGetHandle($iLabel)) 36 | If @error Then 37 | Return SetError(1, 0 * GUICtrlDelete($iLabel), 0) 38 | EndIf 39 | GUICtrlDelete($iLabel) 40 | EndIf 41 | 42 | If IsHWnd($__aGUIDisable[$__hGUIDisableHWnd]) Then 43 | GUIDelete($__aGUIDisable[$__hGUIDisableHWnd]) 44 | GUISwitch($__aGUIDisable[$__hGUIDisableHWndPrevious]) 45 | $__aGUIDisable[$__hGUIDisableHWnd] = 0 46 | $__aGUIDisable[$__hGUIDisableHWndPrevious] = 0 47 | Else 48 | $__aGUIDisable[$__hGUIDisableHWndPrevious] = $hWnd 49 | 50 | Local $iLeft = 0, $iTop = 0 51 | Local $iStyle = GUIGetStyle($__aGUIDisable[$__hGUIDisableHWndPrevious]) 52 | Local $sCurrentTheme = RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes', 'CurrentTheme') 53 | Local $iIsClassicTheme = Number(StringInStr($sCurrentTheme, 'Basic.theme', 2) = 0 And StringInStr($sCurrentTheme, 'Ease of Access Themes', 2) > 0) 54 | 55 | Local $aWinGetPos = WinGetClientSize($__aGUIDisable[$__hGUIDisableHWndPrevious]) 56 | $__aGUIDisable[$__hGUIDisableHWnd] = GUICreate('', $aWinGetPos[0], $aWinGetPos[1], $iLeft + 3, $iTop + 3, $WS_POPUP, $WS_EX_MDICHILD, $__aGUIDisable[$__hGUIDisableHWndPrevious]) 57 | GUISetBkColor($bColor, $__aGUIDisable[$__hGUIDisableHWnd]) 58 | WinSetTrans($__aGUIDisable[$__hGUIDisableHWnd], '', Round($iBrightness * (255 / 100))) 59 | If not $iAnimate Then 60 | GUISetState(@SW_SHOW, $__aGUIDisable[$__hGUIDisableHWnd]) 61 | EndIf 62 | GUISetState(@SW_DISABLE, $__aGUIDisable[$__hGUIDisableHWnd]) 63 | GUISwitch($__aGUIDisable[$__hGUIDisableHWndPrevious]) 64 | EndIf 65 | Return $__aGUIDisable[$__hGUIDisableHWnd] 66 | EndFunc ;==>_GUIDisable 67 | 68 | ; #INTERNAL_USE_ONLY#============================================================================================================ 69 | Func __GUIDisable_WM_SIZE($hWnd, $iMsg, $iwParam, $ilParam) 70 | #forceref $hWnd, $iMsg, $iwParam 71 | Local $iHeight = _WinAPI_HiWord($ilParam) 72 | Local $iWidth = _WinAPI_LoWord($ilParam) 73 | If $hWnd = $__aGUIDisable[$__hGUIDisableHWndPrevious] Then 74 | Local $iWinGetPos = WinGetPos($__aGUIDisable[$__hGUIDisableHWnd]) 75 | If @error = 0 Then 76 | WinMove($__aGUIDisable[$__hGUIDisableHWnd], '', $iWinGetPos[0], $iWinGetPos[1], $iWidth, $iHeight) 77 | EndIf 78 | EndIf 79 | Return $GUI_RUNDEFMSG 80 | EndFunc ;==>__GUIDisable_WM_SIZE 81 | -------------------------------------------------------------------------------- /source/URL_Json_Encode.au3: -------------------------------------------------------------------------------- 1 | ;=============================================================================== 2 | ; _URLEncode() 3 | ; Description: : Encodes a string to be URL-friendly 4 | ; Parameter(s): : $toEncode - The String to Encode 5 | ; : $encodeType = 0 - Practical Encoding (Encode only what is necessary) 6 | ; : = 1 - Encode everything 7 | ; : = 2 - RFC 1738 Encoding - http://www.ietf.org/rfc/rfc1738.txt 8 | ; Return Value(s): : The URL encoded string 9 | ; Author(s): : nfwu 10 | ; Note(s): : - 11 | ; 12 | ;=============================================================================== 13 | Func _URLEncode($toEncode, $encodeType = 0) 14 | Local $strHex = "", $iDec 15 | Local $aryChar = StringSplit($toEncode, "") 16 | If $encodeType = 1 Then;;Encode EVERYTHING 17 | For $i = 1 To $aryChar[0] 18 | $strHex = $strHex & "%" & Hex(Asc($aryChar[$i]), 2) 19 | Next 20 | Return $strHex 21 | ElseIf $encodeType = 0 Then;;Practical Encoding 22 | For $i = 1 To $aryChar[0] 23 | $iDec = Asc($aryChar[$i]) 24 | if $iDec <= 32 Or $iDec = 37 Then 25 | $strHex = $strHex & "%" & Hex($iDec, 2) 26 | Else 27 | $strHex = $strHex & $aryChar[$i] 28 | EndIf 29 | Next 30 | Return $strHex 31 | ElseIf $encodeType = 2 Then;;RFC 1738 Encoding 32 | For $i = 1 To $aryChar[0] 33 | If Not StringInStr("$-_.+!*'(),;/?:@=&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", $aryChar[$i]) Then 34 | $strHex = $strHex & "%" & Hex(Asc($aryChar[$i]), 2) 35 | Else 36 | $strHex = $strHex & $aryChar[$i] 37 | EndIf 38 | Next 39 | Return $strHex 40 | EndIf 41 | EndFunc 42 | ;=============================================================================== 43 | ; _URLDecode() 44 | ; Description: : Tranlates a URL-friendly string to a normal string 45 | ; Parameter(s): : $toDecode - The URL-friendly string to decode 46 | ; Return Value(s): : The URL decoded string 47 | ; Author(s): : nfwu 48 | ; Note(s): : - 49 | ; 50 | ;=============================================================================== 51 | Func _URLDecode($toDecode) 52 | local $strChar = "", $iOne, $iTwo 53 | Local $aryHex = StringSplit($toDecode, "") 54 | For $i = 1 to $aryHex[0] 55 | If $aryHex[$i] = "%" Then 56 | $i = $i + 1 57 | $iOne = $aryHex[$i] 58 | $i = $i + 1 59 | $iTwo = $aryHex[$i] 60 | $strChar = $strChar & Chr(Dec($iOne & $iTwo)) 61 | Else 62 | $strChar = $strChar & $aryHex[$i] 63 | EndIf 64 | Next 65 | Return StringReplace($strChar, "+", " ") 66 | EndFunc 67 | 68 | ;=============================================================================== 69 | ; _JsonEscape() 70 | ; Description: : Encodes a string to be used for a Json string 71 | ; Parameter(s): : $InputStr - The String to Encode 72 | ; Return Value(s): : The encoded string 73 | ; Reference: https://www.ietf.org/rfc/rfc4627.txt 74 | ; Note: The input string is supposed to be encoded in UTF16 BE as AutoIt standard 75 | ;=============================================================================== 76 | 77 | Func _JsonStringEscape($InputStr) 78 | $StrLength = StringLen($InputStr) 79 | Local $EncodedString = "" 80 | Local $sExemptChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !#$%&'()-_.+*,;?:@=<>{}[]^`~" 81 | For $i = 1 To $StrLength 82 | Local $sChar = StringMid($InputStr, $i, 1) 83 | If StringInStr( $sExemptChars, $sChar, 1) Then 84 | $EncodedString &= $sChar ; simple chars, add directly 85 | Else 86 | Switch $sChar 87 | Case '"' ; quote 88 | $EncodedString &= '\"' 89 | Case "\" ; back slash 90 | $EncodedString &= '\\' 91 | Case ChrW(8) ; Backspace 92 | $EncodedString &= "\b" 93 | Case Chrw(12) ; Form feed 94 | $EncodedString &= "\f" 95 | Case ChrW(10) ; line feed 96 | $EncodedString &= "\n" 97 | Case ChrW(13) ; Carriage return 98 | $EncodedString &= "\r" 99 | Case ChrW(9) ; Tab 100 | $EncodedString &= "\t" 101 | Case Else 102 | $EncodedString &= '\u' & Hex( StringToBinary($sChar, 3), 4 ) ; Always Big Endian if using \uXXXX 103 | EndSwitch 104 | EndIf 105 | Next 106 | Return $EncodedString 107 | EndFunc ;==>_UnicodeURLEncode 108 | -------------------------------------------------------------------------------- /source/Forms/CustomizeForm.au3: -------------------------------------------------------------------------------- 1 | ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; 2 | #include 3 | #include 4 | #include 5 | #Include 6 | ; #include 7 | #include <..\GUIListViewEx.au3> 8 | Global $customList 9 | 10 | Func CustomList($sCategory, ByRef $aCategory) 11 | ; sCategory is "Scenes","Movies"... 12 | ; aCategory is the array that contains Item_Handle, Item_Title, Item_Link 13 | ; Global Enum $ITEM_HANDLE, $ITEM_TITLE, $ITEM_LINK 14 | ; Global $iMaxSubItems 15 | 16 | 17 | ; Disable the tray clicks 18 | TraySetClick(0) 19 | 20 | Local $guiCustom = GUICreate("Customize " & $sCategory,1060,1126,-1,-1,-1,-1) 21 | GUISetIcon("helper2.ico") 22 | 23 | GUICtrlCreateLabel("Customize the list of " & $sCategory & _ 24 | ". This is like bookmarks or favorites for Stash. You paste the link from the address bar, then put a title for it, as the examples you see below." _ 25 | &@crlf&"To edit the list, double-click on the item, type or paste the text then press enter.",80,50,882,196,-1,-1) 26 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 27 | GUICtrlSetBkColor(-1,"-2") 28 | 29 | $customList = GUICtrlCreatelistview("#| Title| Query Link",40,270,972,696, _ 30 | BitOR($LVS_NOSCROLL, $LVS_SINGLESEL), _ 31 | BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_DOUBLEBUFFER)) 32 | GUICtrlSetFont(-1,10,400,0,"Tahoma") 33 | ; # 34 | _GUICtrlListView_SetColumnWidth($customList, 0, 50) 35 | ; Title 36 | _GUICtrlListView_SetColumnWidth($customList, 1, 300) 37 | ; _GUICtrlListView_JustifyColumn($customList, 1, 2) 38 | ; Query Link 39 | _GUICtrlListView_SetColumnWidth($customList, 2, 700) 40 | ; _GUICtrlListView_JustifyColumn($customList, 2, 2) 41 | 42 | Local $btnSave = GUICtrlCreateButton("Save",773,993,238,47,-1,-1) 43 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 44 | GUICtrlSetTip(-1,"Save the list and apply the changes.") 45 | local $btnDelete = GUICtrlCreateButton("Delete",47,993,238,47,-1,-1) 46 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 47 | GUICtrlSetTip(-1,"Delete the highlighted row.") 48 | 49 | Local $aList[$iMaxSubItems] 50 | 51 | For $i = 0 to $iMaxSubItems -1 52 | ; Popular all numbers anyway 53 | $aList[$i] = String($i + 1) 54 | Next 55 | For $i = 0 to UBound($aCategory) -1 56 | $aList[$i] &= "|" & $aCategory[$i][$ITEM_TITLE] & "|" & $aCategory[$i][$ITEM_LINK] 57 | Next 58 | 59 | For $i = 0 to $iMaxSubItems -1 60 | _GUICtrlListView_AddItem($customList, $i + 1) 61 | Next 62 | 63 | ; Populate the list view 64 | ; Local $aListHandles[$iMaxSubItems][2] 65 | For $i = 0 to UBound($aCategory) -1 66 | _GUICtrlListView_AddSubItem($customList, $i, $aCategory[$i][$ITEM_TITLE], 1) 67 | _GUICtrlListView_AddSubItem($customList, $i, $aCategory[$i][$ITEM_LINK], 2) 68 | Next 69 | 70 | GUISetState(@SW_SHOW, $guiCustom) 71 | ; Make list view editable 72 | Local $iLV_Index = _GUIListViewEx_Init($customList, $aList, 0, 0, True, 2) 73 | _GUIListViewEx_SetEditStatus($iLV_Index, "1;2", 1, Default) 74 | _GUIListViewEx_MsgRegister(True, False, False) 75 | 76 | ; Now do the loop 77 | While True 78 | ; if click on tray icon, activate the current GUI 79 | Local $nTrayMsg = TrayGetMsg() 80 | Switch $nTrayMsg 81 | Case $TRAY_EVENT_PRIMARYDOWN, $TRAY_EVENT_SECONDARYDOWN 82 | WinActivate($guiCustom) 83 | EndSwitch 84 | 85 | Local $nMsg = GUIGetMsg() 86 | Switch $nMsg 87 | Case 0 88 | ; Nothing should be here. 89 | Case $customList 90 | ; ConsoleWrite("here" & @CRLF) 91 | Case $btnSave 92 | Local $aRead = _GUIListViewEx_ReturnArray($iLV_Index) 93 | ; _ArrayDisplay($aRead) 94 | Local $str = $aRead[0] 95 | For $i = 1 to $iMaxSubItems-1 96 | $str &= "@@@" & $aRead[$i] 97 | Next 98 | RegWrite("HKEY_CURRENT_USER\Software\Stash_Helper", $sCategory & "List", "REG_SZ", $str) 99 | ; Need to load the Items here. 100 | ReloadMenu($sCategory) 101 | ExitLoop 102 | Case $btnDelete 103 | If _GUICtrlListView_GetSelectedCount($customList) = 0 Then 104 | MsgBox(0, "No item is selected", "Please select a row first.") 105 | ContinueLoop 106 | EndIf 107 | ; Now $iRow is the one needs to be deleted. 108 | _GUIListViewEx_SetActive($iLV_Index) 109 | ; Delete the selected one. 110 | _GUIListViewEx_Delete() 111 | ; Insert an empty row at the end 112 | _GUIListViewEx_InsertSpec($iLV_Index, -1, "") 113 | ; Unselect it. 114 | _GUICtrlListView_SetItemSelected ($customList, $iMaxSubItems-1, False ) 115 | ; Repopulate the leading numbers. 116 | ; Local $aList[$iMaxSubItems] 117 | For $i = 0 to $iMaxSubItems -1 118 | ; Set the # 1,2,3,4... 119 | _GUICtrlListView_SetItemText($customList, $i, $i + 1) 120 | Next 121 | 122 | Case $GUI_EVENT_CLOSE 123 | ExitLoop 124 | EndSwitch 125 | 126 | _GUIListViewEx_EventMonitor() 127 | Wend 128 | _GUIListViewEx_Close($iLV_Index) 129 | GUIDelete($guiCustom) 130 | $customList = 0 131 | ; restore the tray icon functions. 132 | TraySetClick(9) 133 | EndFunc 134 | 135 | -------------------------------------------------------------------------------- /source/Forms/Custom.isf: -------------------------------------------------------------------------------- 1 | ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; 2 | #include 3 | #include 4 | #include 5 | #Include 6 | #include 7 | 8 | If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware") 9 | 10 | $Custom = GUICreate("Custom",1059,1126,-1,-1,-1,-1) 11 | GUICtrlCreateLabel("Customize the list of [Movies]. This is like bookmarks or favorites. You paste the text after the '?' from the address bar, then put a title for it, as the examples you see below."&@crlf&"For now I put 20 as the max number of each category, if you want more, send me a message in the GitHub repo.",80,50,882,196,-1,-1) 12 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 13 | GUICtrlSetBkColor(-1,"-2") 14 | GUICtrlSetResizing(-1,38) 15 | $iList = GUICtrlCreatelistview("#| Title| Query Text",40,270,971,696,BitOr($LVS_NOSCROLL,$LVS_SINGLESEL),BitOr($LVS_EX_GRIDLINES,$WS_EX_CLIENTEDGE)) 16 | GUICtrlSetFont(-1,10,400,0,"Tahoma") 17 | GUICtrlSetResizing(-1,102) 18 | _GUICtrlListView_SetColumnWidth($iList, 0, 50) 19 | _GUICtrlListView_SetColumnWidth($iList, 1, 300) 20 | _GUICtrlListView_SetColumnWidth($iList, 2, 700) 21 | For $i = 0 to 19 22 | _GUICtrlListView_AddItem($iList, $i + 1) 23 | Next 24 | $btnSave = GUICtrlCreateButton("Save",773,993,238,47,-1,-1) 25 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 26 | GUICtrlSetTip(-1,"Save the list and apply the changes.") 27 | GUICtrlSetResizing(-1,836) 28 | $btnDelete = GUICtrlCreateButton("Delete",47,993,238,47,-1,-1) 29 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 30 | GUICtrlSetTip(-1,"Delete the highlighted row.") 31 | GUICtrlSetResizing(-1,834) 32 | 33 | 34 | 35 | #cs 36 | [gui] 37 | Handle_deklaration=default 38 | Handle_deklaration_const=false 39 | title=Custom 40 | breite=1059 41 | hoehe=1126 42 | style=-1 43 | exstyle=-1 44 | bgcolour=0xF0F0F0 45 | bgimage=none 46 | handle=$Custom 47 | parent= 48 | code= 49 | codebeforegui=If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware") 50 | xpos=-1 51 | ypos=-1 52 | center_gui=true 53 | title_textmode=normal 54 | isf_include_once=false 55 | only_controls_in_isf=false 56 | const_modus=default 57 | gui_code_in_function=false 58 | gui_code_in_function_name= 59 | gui_event_close= 60 | gui_event_minimize= 61 | gui_event_restore= 62 | gui_event_maximize= 63 | gui_event_mousemove= 64 | gui_event_primarydown= 65 | gui_event_primaryup= 66 | gui_event_secoundarydown= 67 | gui_event_secoundaryup= 68 | gui_event_resized= 69 | gui_event_dropped= 70 | defaultfont=MS Sans Serif 71 | defaultfontsize=8 72 | [0x000B1D06] 73 | type=label 74 | handle=432 75 | locked=0 76 | resize=38 77 | x=80 78 | y=50 79 | width=882 80 | height=196 81 | func= 82 | font=Tahoma 83 | fontsize=12 84 | fontstyle=400 85 | fontattribute=0 86 | tooltip= 87 | bgimage= 88 | textcolour=0x000000 89 | id= 90 | text=Customize the list of [Movies]. This is like bookmarks or favorites. You paste the text after the '?' from the address bar, then put a title for it, as the examples you see below.[BREAK]For now I put 20 as the max number of each category, if you want more, send me a message in the GitHub repo. 91 | state=$GUI_SHOW+$GUI_ENABLE 92 | style= 93 | exstyle= 94 | bgcolour=-2 95 | code= 96 | order=0 97 | tabpage=-1 98 | iconindex= 99 | iconlarge=0 100 | textmode=text 101 | [0x00041D68] 102 | type=listview 103 | handle=433 104 | locked=0 105 | resize=102 106 | x=40 107 | y=270 108 | width=971 109 | height=696 110 | func= 111 | font=Tahoma 112 | fontsize=10 113 | fontstyle=400 114 | fontattribute=0 115 | tooltip= 116 | bgimage= 117 | textcolour=0x000000 118 | id=$iList 119 | text=#| Title| Query Text 120 | state=$GUI_SHOW+$GUI_ENABLE 121 | style=$LVS_NOSCROLL+$LVS_SINGLESEL 122 | exstyle=$LVS_EX_GRIDLINES+$WS_EX_CLIENTEDGE 123 | bgcolour= 124 | code=_GUICtrlListView_SetColumnWidth($iList, 0, 50)[BREAK]_GUICtrlListView_SetColumnWidth($iList, 1, 300)[BREAK]_GUICtrlListView_SetColumnWidth($iList, 2, 700)[BREAK]For $i = 0 to 19[BREAK] _GUICtrlListView_AddItem($iList, $i + 1)[BREAK]Next 125 | order=2 126 | tabpage=-1 127 | iconindex= 128 | iconlarge=0 129 | textmode=text 130 | [0x00101A70] 131 | type=button 132 | handle=434 133 | locked=0 134 | resize=836 135 | x=773 136 | y=993 137 | width=238 138 | height=47 139 | func= 140 | font=Tahoma 141 | fontsize=12 142 | fontstyle=400 143 | fontattribute=0 144 | tooltip=Save the list and apply the changes. 145 | bgimage= 146 | textcolour=0x000000 147 | id=$btnSave 148 | text=Save 149 | state=$GUI_SHOW+$GUI_ENABLE 150 | style= 151 | exstyle= 152 | bgcolour= 153 | code= 154 | order=3 155 | tabpage=-1 156 | iconindex= 157 | iconlarge=0 158 | textmode=text 159 | [0x00051E3A] 160 | type=button 161 | handle=435 162 | locked=0 163 | resize=834 164 | x=47 165 | y=993 166 | width=238 167 | height=47 168 | func= 169 | font=Tahoma 170 | fontsize=12 171 | fontstyle=400 172 | fontattribute=0 173 | tooltip=Delete the highlighted row. 174 | bgimage= 175 | textcolour=0x000000 176 | id=$btnDelete 177 | text=Delete 178 | state=$GUI_SHOW+$GUI_ENABLE 179 | style= 180 | exstyle= 181 | bgcolour= 182 | code= 183 | tabpage=-1 184 | iconindex= 185 | iconlarge=0 186 | textmode=text 187 | order=4 188 | #ce 189 | -------------------------------------------------------------------------------- /source/Forms/MetroPopUpMenu.au3: -------------------------------------------------------------------------------- 1 | ; MetroPopUpMenu.au3 2 | ; For middle mouse button pop up. 3 | Global $gbMetroPopMenuOpen 4 | 5 | Func MetroPopUpMenu() 6 | Local $aPos = MouseGetPos() 7 | ; create the form. 8 | Local $iGuiX = $aPos[0], $iGuiY = $aPos[1] 9 | #include "MetroPopup.isf" 10 | Local $aButtonIDs = [ $btnMetroPlay, $btnMetroAddToList, $btnMetroSendList, _ 11 | $btnMetroEditList, $btnMetroCreateMovie, $btnMetroCopyScene, $btnMetroCancel] 12 | GUISetIcon("helper2.ico") 13 | GUISetState() 14 | While True 15 | Switch GUIGetMsg() 16 | Case $GUI_EVENT_CLOSE, $btnMetroCancel 17 | ExitLoop 18 | 19 | Case $btnMetroPlay 20 | $sCatNo = GetCurrentTabCategoryAndNumber() 21 | If StringInStr($sCatNo, "-") = 0 Then 22 | MsgBox(0, "Not support", "You are in category: " & $sCatNo & ". You need to browse to one scene or movie." ) 23 | Else 24 | $aCatNo = StringSplit($sCatNo, "-") 25 | If $aCatNo[0] = 2 and StringIsDigit( $aCatNo[2]) Then 26 | Switch $aCatNo[1] 27 | Case "scenes", "movies", "images", "galleries" 28 | GUISetState( @SW_HIDE, $guiMetroPopup ) 29 | PlayCurrentTab() 30 | ExitLoop 31 | EndSwitch 32 | EndIf 33 | c( "$sCatNo:" & $sCatNo) 34 | MsgBox(262192,"Not supported","The current page is not supported.",0) 35 | ContinueLoop 36 | 37 | EndIf 38 | 39 | Case $btnMetroAddToList 40 | AddItemToList() 41 | ;~ $sCatNo = GetCurrentTabCategoryAndNumber() 42 | ;~ If StringInStr($sCatNo, "-") = 0 Then 43 | ;~ MsgBox(0, "Not support", "You are in category: " & $sCatNo & ". You need to browse to one scene or movie.") 44 | ;~ Else 45 | ;~ $aCatNo = StringSplit($sCatNo, "-") 46 | ;~ If $aCatNo[0] = 2 And StringIsDigit( $aCatNo[2] ) Then 47 | ;~ Switch $aCatNo[1] 48 | ;~ Case "scenes", "movies", "images", "galleries" 49 | ;~ GUISetState( @SW_HIDE, $guiMetroPopup ) 50 | ;~ AddItemToList() 51 | ;~ ExitLoop 52 | ;~ EndSwitch 53 | ;~ EndIf 54 | ;~ c( "$sCatNo:" & $sCatNo) 55 | ;~ MsgBox(262192,"Not supported","The current page is not supported.",0) 56 | ;~ ContinueLoop 57 | ;~ EndIf 58 | 59 | Case $btnMetroSendList 60 | GUISetState( @SW_HIDE, $guiMetroPopup ) 61 | SendPlayerList() 62 | ExitLoop 63 | Case $btnMetroEditList 64 | GUISetState( @SW_HIDE, $guiMetroPopup ) 65 | ManagePlayList() 66 | ExitLoop 67 | Case $btnMetroCreateMovie 68 | $sCatNo = GetCurrentTabCategoryAndNumber() 69 | If StringInStr($sCatNo, "-") = 0 Then 70 | MsgBox(0, "Not support", "You are in category: " & $sCatNo & ". You need to browse to one scene.") 71 | Else 72 | $aCatNo = StringSplit($sCatNo, "-") 73 | If $aCatNo[0] = 2 And $aCatNo[1] = "scenes" And StringIsDigit( $aCatNo[2] ) Then 74 | GUISetState( @SW_HIDE, $guiMetroPopup ) 75 | Scene2Movie() 76 | ExitLoop 77 | Else 78 | c( "$sCatNo:" & $sCatNo) 79 | MsgBox(262192,"Not supported","The current category: " & $aCatNo[1] & " is not supported.",0) 80 | ContinueLoop 81 | EndIf 82 | EndIf 83 | Case $btnMetroCopyScene 84 | $sCatNo = GetCurrentTabCategoryAndNumber() 85 | If StringInStr($sCatNo, "-") = 0 Then 86 | MsgBox(0, "Not support", "You are in category: " & $sCatNo & ". You need to browse to one scene.") 87 | Else 88 | $aCatNo = StringSplit($sCatNo, "-") 89 | If $aCatNo[0] = 2 And $aCatNo[1] = "scenes" And StringIsDigit( $aCatNo[2] ) Then 90 | GUISetState( @SW_HIDE, $guiMetroPopup ) 91 | CopySceneInfo() 92 | ExitLoop 93 | Else 94 | c( "$sCatNo:" & $sCatNo) 95 | MsgBox(262192,"Not supported","The current category: " & $aCatNo[1] & " is not supported.",0) 96 | ContinueLoop 97 | EndIf 98 | EndIf 99 | 100 | EndSwitch 101 | If Not WinActive($guiMetroPopup) Then WinActivate($guiMetroPopup) 102 | MetroHover( $guiMetroPopup ) 103 | Sleep(10) 104 | Wend 105 | GUIDelete($guiMetroPopup) 106 | MetroHover( $guiMetroPopup, True) ; Reset hover 107 | EndFunc 108 | 109 | 110 | 111 | 112 | ; Set the hover effect for the metro buttons. 113 | ; $aButtonIDs are the array of button control ids. 114 | Func MetroHover( $guiMetro, $bReset = False ) 115 | ; Judge if the mouse is over the button and return the button number, or 0 116 | Static $iCurrentButton = 0 ; 0: Outside, or button id. 117 | If $bReset Then 118 | $iCurrentButton = 0 119 | return 120 | EndIf 121 | $aPos = GUIGetCursorInfo($guiMetro) 122 | If @error Then Return ; Maybe outside 123 | 124 | If $aPos[4] = 0 Then 125 | ; Cursor is ourside 126 | If $iCurrentButton Then 127 | ; A button was changed, restore it. 128 | MetroNormalButton( $iCurrentButton ) 129 | $iCurrentButton = 0 130 | EndIf 131 | Else 132 | ; inside the gui 133 | If $iCurrentButton <> $aPos[4] Then 134 | If $iCurrentButton Then 135 | ; Restore the previous button to normal 136 | MetroNormalButton( $iCurrentButton ) 137 | Else 138 | ; previously outside 139 | EndIf 140 | MetroHoverButton( $aPos[4] ) ; Hover effect for new button 141 | $iCurrentButton = $aPos[4] 142 | EndIf 143 | EndIf 144 | 145 | EndFunc 146 | 147 | Func MetroHoverButton($iControlID) 148 | ; Set the button to hover style 149 | GUICtrlSetBkColor( $iControlID, 0xFFFF99) 150 | GUICtrlSetColor( $iControlID, 0x000000) 151 | EndFunc 152 | 153 | Func MetroNormalButton($iControlID) 154 | ; Set the button to normal style 155 | GUICtrlSetBkColor( $iControlID, 0x202B33) 156 | GUICtrlSetColor( $iControlID, 0xFFFFFF) 157 | EndFunc -------------------------------------------------------------------------------- /source/CurrentImagesViewer.au3: -------------------------------------------------------------------------------- 1 | ;GalleryViewer.au3 2 | 3 | ; Create a temporary html with all the gallery pictures. 4 | ; Use light gallery 2.0 as the picture viewer. 5 | ; $nGallery is the gallery number in string. 6 | Func CurrentImagesViewer() 7 | ; Don't want to handle all those quotes 8 | Const $sHTML_Head = _BinaryCall_Base64Decode( "PCFET0NUWVBFIGh0bWw+PGh0bWwgbGFuZz0iZW4tVVMiPgo8aGVhZD4KCTx0aXRsZT5UZXN0IExp" & _ 9 | "Z2h0IGdhbGxlcnk8L3RpdGxlPgoJPG1ldGEgY2hhcnNldD0id2luZG93cy0xMjUyIj4KCTxsaW5r" & _ 10 | "IHR5cGU9InRleHQvY3NzIiByZWw9InN0eWxlc2hlZXQiIGhyZWY9InN0eWxlLmNzcyIgLz4KPHN0" & _ 11 | "eWxlPgpib2R5IHsKICBiYWNrZ3JvdW5kLWNvbG9yOiAjMDAwMDAwOwp9Ci5mbGV4LWNvbnRhaW5l" & _ 12 | "cnsKICBkaXNwbGF5OiBmbGV4OwogIGZsZXgtd3JhcDogd3JhcDsKfQouZ2FsbGVyeS1pdGVtewog" & _ 13 | "IHBhZGRpbmc6IDEwcHgKfQouaW1nLXJlc3BvbnNpdmV7CiAgaGVpZ2h0OiAzMDBweDsKfQo8L3N0" & _ 14 | "eWxlPgo8L2hlYWQ+Cjxib2R5Pgo8c2NyaXB0IHNyYz0ic2NyaXB0LmpzIj48L3NjcmlwdD4KCiAg" & _ 15 | "ICA8ZGl2IGNsYXNzPSJmbGV4LWNvbnRhaW5lciIgaWQ9ImFuaW1hdGVkLXRodW1ibmFpbHMtZ2Fs" & _ 16 | "bGVyeSI+Cg==" ) 17 | 18 | Const $sHTML_Tail = _BinaryCall_Base64Decode ( "CiAgICA8L2Rpdj4KCjxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0Ij4KCSAgICB3aW5kb3cu" & _ 19 | "bGlnaHRHYWxsZXJ5KCBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiYW5pbWF0ZWQtdGh1bWJuYWls" & _ 20 | "cy1nYWxsZXJ5IiksCgkgICAgICB7CgkgICAgICAgIHBsdWdpbnM6IFtsZ1pvb20sIGxnVGh1bWJu" & _ 21 | "YWlsXQoJICAgICAgfQoJICAgICk7Cjwvc2NyaXB0Pgo8L2JvZHk+CjwvaHRtbD4=" ) 22 | 23 | 24 | ; Get all the files in a gallery. 25 | Local $sURL = GetURL() 26 | If @error Then Return SetError(1) 27 | 28 | Local $sCategory = GetCategory($sURL) 29 | If @error Then Return SetError(1) 30 | 31 | ; Image array, first one is full size, second is thumbnail. 32 | Local $aImages[0] 33 | 34 | Switch $sCategory 35 | 36 | Case "movies", "scenes", "markers", "performers", "studios", "tags" 37 | MsgBox(0, "Not support", "Sorry, this operation only supports images and galleries.") 38 | Return 39 | Case "images" 40 | $sQuery = URLtoQuery($sURL) 41 | c("Image query:" & $sQuery) 42 | Select 43 | Case $sQuery = "not support" 44 | MsgBox(0, "Not support", "This URL is not supported.") 45 | Return 46 | Case StringLeft($sQuery, 3) = "id=" 47 | MsgBox(0, "Not support", "Single image viewing is not supported.") 48 | Return 49 | Case Else 50 | $sResult = Query2($sQuery) 51 | If @error then Return SetError(1) 52 | $oResult = Json_Decode($sResult) 53 | If not IsObj($oResult) Then 54 | MsgBox(0, "Error", "Error processing images result.") 55 | Return SetError(1) 56 | EndIf 57 | $aImages = Json_ObjGet($oResult, "data.findImages.images") 58 | EndSelect 59 | Case "galleries" 60 | $sQuery = URLtoQuery($sURL, "id", "images{id}") 61 | c("Gallery query:" & $sQuery) 62 | Select 63 | Case $sQuery = "not support" 64 | MsgBox(0, "Not support", "This URL is not supported.") 65 | Return 66 | Case StringLeft($sQuery, 12) = "{findGallery" 67 | ; Get the id of gallery 68 | $sResult = Query2($sQuery) 69 | If @error then Return SetError(1) 70 | $oResult = Json_Decode($sResult) 71 | If not IsObj($oResult) Then 72 | MsgBox(0, "Error", "Error processing gallery result.") 73 | Return SetError(1) 74 | EndIf 75 | $aImages = Json_ObjGet($oResult, "data.findGallery.images") 76 | Case Else 77 | ; Should be findGalleries(...) 78 | $sResult = Query2($sQuery) 79 | If @error then Return SetError(1) 80 | $oResult = Json_Decode($sResult) 81 | If not IsObj($oResult) Then 82 | MsgBox(0, "Error", "Error processing galleries result.") 83 | Return SetError(1) 84 | EndIf 85 | $aGalleries = Json_ObjGet($oResult, "data.findGalleries.galleries") 86 | For $i = 0 To UBound($aGalleries)-1 87 | $aImg = $aGalleries[$i].Item("images") 88 | ; Add the array data to the $aImages 89 | _ArrayConcatenate($aImages, $aImg) 90 | Next 91 | EndSelect 92 | EndSwitch 93 | ; Now process the $aImages 94 | Local $sLinks = "" 95 | 96 | ; If too many images, give out a warning. 97 | Local $iImageCount = UBound($aImages) 98 | If $iImageCount > 1000 Then 99 | Local $reply = MsgBox(266272,"Are you sure?","There are " & $iImageCount & " images in this list. It will take the web browser quite a while to process them." _ 100 | & @CRLF & "Do you want to continue?",0) 101 | if $reply = $IDNO Then Return 102 | EndIf 103 | 104 | For $i = 0 to $iImageCount-1 105 | $sLinks &= '' & @LF _ 106 | & ' ' & @LF 107 | Next 108 | 109 | CopyGalleryFiles() 110 | 111 | $hFile = FileOpen( @AppDataDir & "\Webdriver\tempImageList.html", $FO_OVERWRITE) 112 | If $hFile = -1 Then 113 | MsgBox(0, "error", "Error creating temporary html file.") 114 | Return SetError(1) 115 | EndIf 116 | FileWrite($hFile, $sHTML_Head) 117 | FileWrite($hFile, $sLinks) 118 | FileWrite($hFile, $sHTML_Tail) 119 | If @error Then 120 | MsgBox(0, "Error", "Error writing to temporary html file.") 121 | FileClose($hFile) 122 | Return SetError(1) 123 | EndIf 124 | FileClose($hFile) 125 | $sFileURL = "file:///" & StringReplace(@AppDataDir & "\Webdriver\tempImageList.html", "\", "/") 126 | OpenURL($sFileURL) 127 | EndFunc 128 | 129 | Func CopyGalleryFiles() 130 | Local $sDestPath = @AppDataDir & "\Webdriver\" 131 | If Not FileExists($sDestPath & "lg.ttf") Then 132 | FileCopy(@ScriptDir & "\gallery\lg.ttf", $sDestPath & "lg.ttf") 133 | EndIf 134 | If Not FileExists($sDestPath & "lg.woff") Then 135 | FileCopy(@ScriptDir & "\gallery\lg.woff", $sDestPath & "lg.woff") 136 | EndIf 137 | If Not FileExists($sDestPath & "lg.svg") Then 138 | FileCopy(@ScriptDir & "\gallery\lg.svg", $sDestPath & "lg.svg") 139 | EndIf 140 | If Not FileExists($sDestPath & "script.js") Then 141 | FileCopy(@ScriptDir & "\gallery\script.js", $sDestPath & "script.js") 142 | EndIf 143 | If Not FileExists($sDestPath & "style.css") Then 144 | FileCopy(@ScriptDir & "\gallery\style.css", $sDestPath & "style.css") 145 | EndIf 146 | EndFunc 147 | 148 | -------------------------------------------------------------------------------- /source/Forms/MetroPopup.isf: -------------------------------------------------------------------------------- 1 | ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; 2 | Local $guiMetroPopup = GUICreate( "MetroPopup", 436, 346, $iGuiX, $iGuiY, -2143289216, 9 ) 3 | GUISetBkColor( 0x808080 ) 4 | Local $btnMetroPlay = GUICtrlCreateButton("Play In External Player",3,0,426,48,-1,-1) 5 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 6 | GUICtrlSetColor(-1,"0xFFFFFF") 7 | GUICtrlSetBkColor(-1,"0x202B33") 8 | GUICtrlSetTip(-1,"Play the current scene/movie/image/gallery in external media player.") 9 | Local $btnMetroAddToList = GUICtrlCreateButton("Add to Playlist",3,48,426,48,-1,-1) 10 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 11 | GUICtrlSetColor(-1,"0xFFFFFF") 12 | GUICtrlSetBkColor(-1,"0x202B33") 13 | GUICtrlSetTip(-1,"Add the current media to the playlist.") 14 | Local $btnMetroSendList = GUICtrlCreateButton("Send Playlist to External Player",3,96,426,48,-1,-1) 15 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 16 | GUICtrlSetColor(-1,"0xFFFFFF") 17 | GUICtrlSetBkColor(-1,"0x202B33") 18 | GUICtrlSetTip(-1,"Send the current playlist to external media player.") 19 | Local $btnMetroEditList = GUICtrlCreateButton("Edit Playlist",3,144,426,48,-1,-1) 20 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 21 | GUICtrlSetColor(-1,"0xFFFFFF") 22 | GUICtrlSetBkColor(-1,"0x202B33") 23 | GUICtrlSetTip(-1,"Edit current playlist.") 24 | Local $btnMetroCreateMovie = GUICtrlCreateButton("Create Movie from this Scene",3,192,426,48,-1,-1) 25 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 26 | GUICtrlSetColor(-1,"0xFFFFFF") 27 | GUICtrlSetBkColor(-1,"0x202B33") 28 | GUICtrlSetTip(-1,"Create a movie from this scene. Or create movies.") 29 | Local $btnMetroCopyScene = GUICtrlCreateButton("Copy Info From Another Scene",3,240,426,48,-1,-1) 30 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 31 | GUICtrlSetColor(-1,"0xFFFFFF") 32 | GUICtrlSetBkColor(-1,"0x202B33") 33 | GUICtrlSetTip(-1,"Copy Scene information from another scene by ID and apply to the current scene.") 34 | Local $btnMetroCancel = GUICtrlCreateButton("Cancel",3,288,426,48,-1,-1) 35 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 36 | GUICtrlSetColor(-1,"0xFFFFFF") 37 | GUICtrlSetBkColor(-1,"0x202B33") 38 | GUICtrlSetTip(-1,"Close this menu.") 39 | 40 | 41 | 42 | #cs 43 | [gui] 44 | Handle_deklaration=local 45 | Handle_deklaration_const=false 46 | title=MetroPopup 47 | breite=436 48 | hoehe=346 49 | style=$WS_POPUP+$WS_DLGFRAME+$DS_MODALFRAME 50 | exstyle=$WS_EX_TOPMOST+$WS_EX_DLGMODALFRAME 51 | bgcolour=0x444444 52 | bgimage=none 53 | handle=$guiMetroPopup 54 | parent= 55 | code=%Handle_Declaration%%gui_handle% = GUICreate( "%gui_title%", %gui_width%, %gui_height%, $iGuiX, $iGuiY, %gui_style%, %gui_exstyle% )[BREAK]GUISetBkColor( 0x808080 ) 56 | codebeforegui= 57 | xpos=0 58 | ypos=0 59 | center_gui=false 60 | title_textmode=normal 61 | isf_include_once=false 62 | isf_no_includes=false 63 | only_controls_in_isf=true 64 | const_modus=numbers 65 | gui_code_in_function=false 66 | gui_code_in_function_name= 67 | gui_code_in_function_mode=gui 68 | gui_code_in_function_map_name= 69 | gui_event_close= 70 | gui_event_minimize= 71 | gui_event_restore= 72 | gui_event_maximize= 73 | gui_event_mousemove= 74 | gui_event_primarydown= 75 | gui_event_primaryup= 76 | gui_event_secoundarydown= 77 | gui_event_secoundaryup= 78 | gui_event_resized= 79 | gui_event_dropped= 80 | defaultfont=MS Sans Serif 81 | defaultfontsize=8 82 | [0x000A27EE] 83 | type=button 84 | handle=445 85 | locked=0 86 | resize= 87 | x=3 88 | y=0 89 | width=426 90 | height=48 91 | func= 92 | font=Tahoma 93 | fontsize=12 94 | fontstyle=400 95 | fontattribute=0 96 | tooltip=Play the current scene/movie/image/gallery in external media player. 97 | bgimage= 98 | textcolour=0xFFFFFF 99 | id=$btnMetroPlay 100 | text=Play In External Player 101 | state=$GUI_SHOW+$GUI_ENABLE 102 | style= 103 | exstyle= 104 | bgcolour=0x202B33 105 | code= 106 | order=0 107 | tabpage=-1 108 | iconindex= 109 | iconlarge=0 110 | textmode=text 111 | [0x000227EC] 112 | type=button 113 | handle=446 114 | locked=0 115 | resize= 116 | x=3 117 | y=48 118 | width=426 119 | height=48 120 | func= 121 | font=Tahoma 122 | fontsize=12 123 | fontstyle=400 124 | fontattribute=0 125 | tooltip=Add the current media to the playlist. 126 | bgimage= 127 | textcolour=0xFFFFFF 128 | id=$btnMetroAddToList 129 | text=Add to Playlist 130 | state=$GUI_SHOW+$GUI_ENABLE 131 | style= 132 | exstyle= 133 | bgcolour=0x202B33 134 | code= 135 | tabpage=-1 136 | iconindex= 137 | iconlarge=0 138 | textmode=text 139 | order=2 140 | [0x00022828] 141 | type=button 142 | handle=447 143 | locked=0 144 | resize= 145 | x=3 146 | y=96 147 | width=426 148 | height=48 149 | func= 150 | font=Tahoma 151 | fontsize=12 152 | fontstyle=400 153 | fontattribute=0 154 | tooltip=Send the current playlist to external media player. 155 | bgimage= 156 | textcolour=0xFFFFFF 157 | id=$btnMetroSendList 158 | text=Send Playlist to External Player 159 | state=$GUI_SHOW+$GUI_ENABLE 160 | style= 161 | exstyle= 162 | bgcolour=0x202B33 163 | code= 164 | tabpage=-1 165 | iconindex= 166 | iconlarge=0 167 | textmode=text 168 | order=3 169 | [0x0002282A] 170 | type=button 171 | handle=448 172 | locked=0 173 | resize= 174 | x=3 175 | y=144 176 | width=426 177 | height=48 178 | func= 179 | font=Tahoma 180 | fontsize=12 181 | fontstyle=400 182 | fontattribute=0 183 | tooltip=Edit current playlist. 184 | bgimage= 185 | textcolour=0xFFFFFF 186 | id=$btnMetroEditList 187 | text=Edit Playlist 188 | state=$GUI_SHOW+$GUI_ENABLE 189 | style= 190 | exstyle= 191 | bgcolour=0x202B33 192 | code= 193 | tabpage=-1 194 | iconindex= 195 | iconlarge=0 196 | textmode=text 197 | order=4 198 | [0x0009282C] 199 | type=button 200 | handle=449 201 | locked=0 202 | resize= 203 | x=3 204 | y=192 205 | width=426 206 | height=48 207 | func= 208 | font=Tahoma 209 | fontsize=12 210 | fontstyle=400 211 | fontattribute=0 212 | tooltip=Create a movie from this scene. Or create movies. 213 | bgimage= 214 | textcolour=0xFFFFFF 215 | id=$btnMetroCreateMovie 216 | text=Create Movie from this Scene 217 | state=$GUI_SHOW+$GUI_ENABLE 218 | style= 219 | exstyle= 220 | bgcolour=0x202B33 221 | code= 222 | tabpage=-1 223 | iconindex= 224 | iconlarge=0 225 | textmode=text 226 | order=5 227 | [0x000A1F2A] 228 | type=button 229 | handle=450 230 | locked=0 231 | resize= 232 | x=3 233 | y=240 234 | width=426 235 | height=48 236 | func= 237 | font=Tahoma 238 | fontsize=12 239 | fontstyle=400 240 | fontattribute=0 241 | tooltip=Copy Scene information from another scene by ID and apply to the current scene. 242 | bgimage= 243 | textcolour=0xFFFFFF 244 | id=$btnMetroCopyScene 245 | text=Copy Info From Another Scene 246 | state=$GUI_SHOW+$GUI_ENABLE 247 | style= 248 | exstyle= 249 | bgcolour=0x202B33 250 | code= 251 | tabpage=-1 252 | iconindex= 253 | iconlarge=0 254 | textmode=text 255 | order=6 256 | [0x000E1E58] 257 | type=button 258 | handle=451 259 | locked=0 260 | resize= 261 | x=3 262 | y=288 263 | width=426 264 | height=48 265 | func= 266 | font=Tahoma 267 | fontsize=12 268 | fontstyle=400 269 | fontattribute=0 270 | tooltip=Close this menu. 271 | bgimage= 272 | textcolour=0xFFFFFF 273 | id=$btnMetroCancel 274 | text=Cancel 275 | state=$GUI_SHOW+$GUI_ENABLE 276 | style= 277 | exstyle= 278 | bgcolour=0x202B33 279 | code= 280 | tabpage=-1 281 | iconindex= 282 | iconlarge=0 283 | textmode=text 284 | order=7 285 | #ce 286 | -------------------------------------------------------------------------------- /source/Forms/ManagePlayList.isf: -------------------------------------------------------------------------------- 1 | ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; 2 | #include 3 | #include 4 | #include 5 | #Include 6 | #include 7 | 8 | If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware") 9 | #include 10 | 11 | $ManagePlayList = GUICreate("Manage Play List",1034,1037,-1,-1,$WS_SIZEBOX,-1) 12 | $lvPlayList = GUICtrlCreatelistview("#|Title|Duration|File/Path",30,60,959,864,-1,BitOr($LVS_EX_FULLROWSELECT,$LVS_EX_GRIDLINES,$WS_EX_CLIENTEDGE)) 13 | GUICtrlSetResizing(-1,102) 14 | _GUICtrlListView_SetColumnWidth($lvPlayList, 0, 40) ; # 15 | _GUICtrlListView_SetColumnWidth($lvPlayList, 1, 300) ; Title 16 | _GUICtrlListView_SetColumnWidth($lvPlayList, 2, 100) ; Duration 17 | _GUICtrlListView_SetColumnWidth($lvPlayList, 3, 500) ; File 18 | _GUICtrlListView_JustifyColumn($lvPlayList, 0, 2) 19 | _GUICtrlListView_JustifyColumn($lvPlayList, 2, 2) 20 | GUICtrlCreateListViewItem("1|test title|10:00|testfile", $lvPlayList) 21 | GUICtrlCreateListViewItem("2|test title|12:00|testfile", $lvPlayList) 22 | GUICtrlCreateListViewItem("3|test title|13:00|testfile", $lvPlayList) 23 | GUICtrlCreateListViewItem("4|test title|14:00|testfile", $lvPlayList) 24 | 25 | ; _GUICtrlListView_SetBkColor($lvPlayList, $CLR_MONEYGREEN) 26 | _GUICtrlListView_SetTextBkColor($lvPlayList, $CLR_CREAM ) 27 | $btnDelete = GUICtrlCreateButton("Delete",30,936,161,42,-1,-1) 28 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 29 | GUICtrlSetTip(-1,"Delete the current selected item from the list.") 30 | GUICtrlSetResizing(-1,834) 31 | $btnLoad = GUICtrlCreateButton("Load",621,937,161,42,-1,-1) 32 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 33 | GUICtrlSetTip(-1,"Load a play list file (.m3u) from a folder.") 34 | GUICtrlSetResizing(-1,836) 35 | $btnSave = GUICtrlCreateButton("Save",830,937,161,42,-1,-1) 36 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 37 | GUICtrlSetTip(-1,"Save the current list to a M3U file.") 38 | GUICtrlSetResizing(-1,836) 39 | GUICtrlCreateButton("Play",236,937,161,42,-1,-1) 40 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 41 | GUICtrlSetTip(-1,"Play this list in external media player.") 42 | GUICtrlSetResizing(-1,834) 43 | $btnClear = GUICtrlCreateButton("Clear",422,937,161,42,-1,-1) 44 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 45 | GUICtrlSetTip(-1,"Clear the play list.") 46 | GUICtrlSetResizing(-1,960) 47 | 48 | 49 | 50 | #cs 51 | [gui] 52 | Handle_deklaration=default 53 | Handle_deklaration_const=false 54 | title=Manage Play List 55 | breite=1034 56 | hoehe=1037 57 | style=$WS_SIZEBOX 58 | exstyle=-1 59 | bgcolour=0xF0F0F0 60 | bgimage=none 61 | handle=$ManagePlayList 62 | parent= 63 | code= 64 | codebeforegui=If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware")[BREAK]#include [BREAK] 65 | xpos=-1 66 | ypos=-1 67 | center_gui=true 68 | title_textmode=normal 69 | isf_include_once=false 70 | only_controls_in_isf=false 71 | const_modus=default 72 | gui_code_in_function=false 73 | gui_code_in_function_name= 74 | gui_event_close= 75 | gui_event_minimize= 76 | gui_event_restore= 77 | gui_event_maximize= 78 | gui_event_mousemove= 79 | gui_event_primarydown= 80 | gui_event_primaryup= 81 | gui_event_secoundarydown= 82 | gui_event_secoundaryup= 83 | gui_event_resized= 84 | gui_event_dropped= 85 | defaultfont=MS Sans Serif 86 | defaultfontsize=8 87 | [0x00081E26] 88 | type=listview 89 | handle=432 90 | locked=0 91 | resize=102 92 | x=30 93 | y=60 94 | width=959 95 | height=864 96 | func= 97 | font=MS Sans Serif 98 | fontsize=8 99 | fontstyle=400 100 | fontattribute=0 101 | tooltip= 102 | bgimage= 103 | textcolour=0x000000 104 | id=$lvPlayList 105 | text=#|Title|Duration|File/Path 106 | state=$GUI_SHOW+$GUI_ENABLE 107 | style= 108 | exstyle=$LVS_EX_FULLROWSELECT+$LVS_EX_GRIDLINES+$WS_EX_CLIENTEDGE 109 | bgcolour= 110 | code=_GUICtrlListView_SetColumnWidth($lvPlayList, 0, 40) ; #[BREAK]_GUICtrlListView_SetColumnWidth($lvPlayList, 1, 300) ; Title[BREAK]_GUICtrlListView_SetColumnWidth($lvPlayList, 2, 100) ; Duration[BREAK]_GUICtrlListView_SetColumnWidth($lvPlayList, 3, 500) ; File[BREAK]_GUICtrlListView_JustifyColumn($lvPlayList, 0, 2)[BREAK]_GUICtrlListView_JustifyColumn($lvPlayList, 2, 2)[BREAK]GUICtrlCreateListViewItem("1|test title|10:00|testfile", $lvPlayList)[BREAK]GUICtrlCreateListViewItem("2|test title|12:00|testfile", $lvPlayList)[BREAK]GUICtrlCreateListViewItem("3|test title|13:00|testfile", $lvPlayList)[BREAK]GUICtrlCreateListViewItem("4|test title|14:00|testfile", $lvPlayList)[BREAK][BREAK]; _GUICtrlListView_SetBkColor($lvPlayList, $CLR_MONEYGREEN)[BREAK]_GUICtrlListView_SetTextBkColor($lvPlayList, $CLR_CREAM ) 111 | order=0 112 | tabpage=-1 113 | iconindex= 114 | iconlarge=0 115 | textmode=text 116 | [0x00021E2C] 117 | type=button 118 | handle=433 119 | locked=0 120 | resize=834 121 | x=30 122 | y=936 123 | width=161 124 | height=42 125 | func= 126 | font=Tahoma 127 | fontsize=12 128 | fontstyle=400 129 | fontattribute=0 130 | tooltip=Delete the current selected item from the list. 131 | bgimage= 132 | textcolour=0x000000 133 | id=$btnDelete 134 | text=Delete 135 | state=$GUI_SHOW+$GUI_ENABLE 136 | style= 137 | exstyle= 138 | bgcolour= 139 | code= 140 | order=2 141 | tabpage=-1 142 | iconindex= 143 | iconlarge=0 144 | textmode=text 145 | [0x00011E2E] 146 | type=button 147 | handle=434 148 | locked=0 149 | resize=836 150 | x=621 151 | y=937 152 | width=161 153 | height=42 154 | func= 155 | font=Tahoma 156 | fontsize=12 157 | fontstyle=400 158 | fontattribute=0 159 | tooltip=Load a play list file (.m3u) from a folder. 160 | bgimage= 161 | textcolour=0x000000 162 | id=$btnLoad 163 | text=Load 164 | state=$GUI_SHOW+$GUI_ENABLE 165 | style= 166 | exstyle= 167 | bgcolour= 168 | code= 169 | tabpage=-1 170 | iconindex= 171 | iconlarge=0 172 | textmode=text 173 | order=3 174 | [0x00011E30] 175 | type=button 176 | handle=435 177 | locked=0 178 | resize=836 179 | x=830 180 | y=937 181 | width=161 182 | height=42 183 | func= 184 | font=Tahoma 185 | fontsize=12 186 | fontstyle=400 187 | fontattribute=0 188 | tooltip=Save the current list to a M3U file. 189 | bgimage= 190 | textcolour=0x000000 191 | id=$btnSave 192 | text=Save 193 | state=$GUI_SHOW+$GUI_ENABLE 194 | style= 195 | exstyle= 196 | bgcolour= 197 | code= 198 | tabpage=-1 199 | iconindex= 200 | iconlarge=0 201 | textmode=text 202 | order=4 203 | [0x00011E32] 204 | type=button 205 | handle=436 206 | locked=0 207 | resize=834 208 | x=236 209 | y=937 210 | width=161 211 | height=42 212 | func= 213 | font=Tahoma 214 | fontsize=12 215 | fontstyle=400 216 | fontattribute=0 217 | tooltip=Play this list in external media player. 218 | bgimage= 219 | textcolour=0x000000 220 | id= 221 | text=Play 222 | state=$GUI_SHOW+$GUI_ENABLE 223 | style= 224 | exstyle= 225 | bgcolour= 226 | code= 227 | tabpage=-1 228 | iconindex= 229 | iconlarge=0 230 | textmode=text 231 | order=5 232 | [0x00031E42] 233 | type=button 234 | handle=437 235 | locked=0 236 | resize=960 237 | x=422 238 | y=937 239 | width=161 240 | height=42 241 | func= 242 | font=Tahoma 243 | fontsize=12 244 | fontstyle=400 245 | fontattribute=0 246 | tooltip=Clear the play list. 247 | bgimage= 248 | textcolour=0x000000 249 | id=$btnClear 250 | text=Clear 251 | state=$GUI_SHOW+$GUI_ENABLE 252 | style= 253 | exstyle= 254 | bgcolour= 255 | code= 256 | tabpage=-1 257 | iconindex= 258 | iconlarge=0 259 | textmode=text 260 | order=6 261 | #ce 262 | -------------------------------------------------------------------------------- /source/Forms/ManagePlayListForm.au3: -------------------------------------------------------------------------------- 1 | Func ManagePlayList() 2 | ; Global $aPlayList 3 | 4 | Global $guiManagePlayList = GUICreate("Manage Play List",1034,1037,-1,-1,$WS_SIZEBOX,-1) 5 | Global $lvPlayList = GUICtrlCreatelistview("#|Title|Duration|File/Path",30,60,959,864,-1,$WS_EX_CLIENTEDGE + $LVS_EX_FULLROWSELECT + $LVS_EX_GRIDLINES) 6 | _GUICtrlListView_SetTextBkColor($lvPlayList, 0xF0FBFF ) 7 | GUICtrlSetResizing(-1,102) 8 | _GUICtrlListView_SetColumnWidth($lvPlayList, 0, 40) ; # 9 | _GUICtrlListView_SetColumnWidth($lvPlayList, 1, 300) ; Title 10 | _GUICtrlListView_SetColumnWidth($lvPlayList, 2, 100) ; Duration 11 | _GUICtrlListView_SetColumnWidth($lvPlayList, 3, 500) ; File 12 | _GUICtrlListView_JustifyColumn($lvPlayList, 0, 2) 13 | _GUICtrlListView_JustifyColumn($lvPlayList, 2, 2) 14 | Local $btnDelete = GUICtrlCreateButton("Delete",30,936,161,42,-1,-1) 15 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 16 | GUICtrlSetTip(-1,"Delete the current selected item from the list.") 17 | GUICtrlSetResizing(-1,834) 18 | Local $btnLoad = GUICtrlCreateButton("Load",621,937,161,42,-1,-1) 19 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 20 | GUICtrlSetTip(-1,"Load a play list file (.m3u) from a folder.") 21 | GUICtrlSetResizing(-1,836) 22 | Local $btnSave = GUICtrlCreateButton("Save",830,937,161,42,-1,-1) 23 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 24 | GUICtrlSetTip(-1,"Save the current list to a M3U file.") 25 | GUICtrlSetResizing(-1,836) 26 | Local $btnPlay = GUICtrlCreateButton("Play",236,937,161,42,-1,-1) 27 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 28 | GUICtrlSetTip(-1,"Play this list in external media player.") 29 | GUICtrlSetResizing(-1,834) 30 | Local $btnClear = GUICtrlCreateButton("Clear",422,937,161,42,-1,-1) 31 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 32 | GUICtrlSetTip(-1,"Clear the play list.") 33 | GUICtrlSetResizing(-1,960) 34 | 35 | ; load the $aPlayList array to the list 36 | For $i = 0 To UBound($aPlayList)-1 37 | Local $iRow = _GUICtrlListView_AddItem($lvPlayList, $i+1) 38 | _GUICtrlListView_SetItemText($lvPlayList, $iRow, $aPlayList[$i][$LIST_TITLE], 1) 39 | _GUICtrlListView_SetItemText($lvPlayList, $iRow, TimeConvert($aPlayList[$i][$LIST_DURATION]), 2) 40 | _GUICtrlListView_SetItemText($lvPlayList, $iRow, $aPlayList[$i][$LIST_FILE], 3) 41 | Next 42 | 43 | ; Disable the tray clicks 44 | TraySetClick(0) 45 | 46 | GUISetState(@SW_SHOW, $guiManagePlayList) 47 | 48 | While True 49 | ; if click on tray icon, activate the current GUI 50 | Local $nTrayMsg = TrayGetMsg() 51 | Switch $nTrayMsg 52 | Case $TRAY_EVENT_PRIMARYDOWN, $TRAY_EVENT_SECONDARYDOWN 53 | WinActivate($guiManagePlayList) 54 | EndSwitch 55 | 56 | Local $nMsg = GUIGetMsg() 57 | Switch $nMsg 58 | Case $btnDelete 59 | ; Delete the highlighted item in the play list. 60 | _GUICtrlListView_DeleteItemsSelected($lvPlayList) 61 | 62 | Case $btnLoad 63 | LoadList($lvPlayList) 64 | Case $btnSave 65 | SaveList($lvPlayList) 66 | Case $btnPlay 67 | SendPlayerList() 68 | Case $btnClear 69 | ClearPlayList() 70 | _GUICtrlListView_DeleteAllItems($lvPlayList) 71 | 72 | Case $GUI_EVENT_CLOSE 73 | ExitLoop 74 | EndSwitch 75 | 76 | Wend 77 | 78 | GUIDelete($guiManagePlayList) 79 | ; restore the tray icon functions. 80 | TraySetClick(9) 81 | 82 | EndFunc 83 | 84 | ; Save the list as m3u file 85 | Func SaveList($lvPlayList) 86 | ; Save the play list to a m3u file. 87 | Local $sFileSaveDialog = FileSaveDialog("Save the m3u list file as:", @DocumentsCommonDir, _ 88 | "M3U Play List File (*.m3u)", 16, "MyPlaylist.m3u" ) 89 | If @error Then 90 | ; Display the error message. 91 | MsgBox($MB_SYSTEMMODAL, "", "No file was saved.") 92 | Return SetError(1) 93 | EndIf 94 | 95 | ; Retrieve the filename from the filepath e.g. Example.au3. 96 | Local $sFileName = StringTrimLeft($sFileSaveDialog, StringInStr($sFileSaveDialog, "\", 2, -1)) 97 | 98 | ; Check if the extension .au3 is appended to the end of the filename. 99 | Local $iExtension = StringInStr($sFileName, ".", 2, -1) 100 | 101 | ; If a period (dot) is found then check whether or not the extension is equal to .au3. 102 | If $iExtension Then 103 | ; If the extension isn't equal to .au3 then append to the end of the filepath. 104 | If StringTrimLeft($sFileName, $iExtension - 1) <> ".m3u" Then $sFileSaveDialog &= ".m3u" 105 | Else 106 | ; If no period (dot) was found then append to the end of the file. 107 | $sFileSaveDialog &= ".m3u" 108 | EndIf 109 | ; set the file name again after modification 110 | $sFileName = StringTrimLeft($sFileSaveDialog, StringInStr($sFileSaveDialog, "\", 2, -1)) 111 | 112 | ; Display the saved file. 113 | ; MsgBox($MB_SYSTEMMODAL, "", "You saved the following file:" & @CRLF & $sFileSaveDialog) 114 | 115 | Local $hFile = FileOpen($sFileSaveDialog, $FO_OVERWRITE) 116 | If $hFile = -1 Then 117 | MsgBox($MB_SYSTEMMODAL, "", "An error occurred when creating the file.") 118 | Return SetError(1) 119 | EndIf 120 | 121 | ; Write the required first line. 122 | FileWriteLine($hFile, "#EXTM3U") 123 | ; Now write the file/path list 124 | Local $iCount = UBound($aPlayList) 125 | Local $sTitle, $sFile 126 | For $i = 0 to $iCount-1 127 | $sTitle = $aPlayList[$i][$LIST_TITLE] 128 | Local $iDuration = $aPlayList[$i][$LIST_DURATION] 129 | $sFile = $aPlayList[$i][$LIST_FILE] 130 | Local $line = "#EXTINF:" & $iDuration & "," & $sTitle 131 | FileWriteLine($hFile, $line ) ; $aData[2] is the name of the file. 132 | ; Write the real file/path on second line. 133 | FileWriteLine($hFile, $sFile) 134 | Next 135 | FileClose($hFile) 136 | MsgBox($MB_ICONINFORMATION, "File Saved.", "This file:" & $sFileName & " was saved.") 137 | EndFunc 138 | 139 | 140 | ; Load the saved m3u to the play list. 141 | Func LoadList($lvPlayList) 142 | ; Global $aPlayList 143 | Local $sFileOpenDialog = FileOpenDialog("Open the m3u list file:", @DocumentsCommonDir, _ 144 | "M3U Play List File (*.m3u)", 3 ) 145 | If @error Then 146 | ; Display the error message. 147 | MsgBox($MB_SYSTEMMODAL, "", "No file was opened.") 148 | Return SetError(1) 149 | EndIf 150 | 151 | If StringInStr($sFileOpenDialog, "|") <> 0 Then 152 | MsgBox($MB_SYSTEMMODAL, "", "Only one file is allowed.") 153 | Return SetError(1) 154 | EndIf 155 | 156 | Local $hFile = FileOpen($sFileOpenDialog, $FO_READ) 157 | If $hFile = -1 Then 158 | MsgBox($MB_SYSTEMMODAL, "", "An error occurred when opening the file.") 159 | Return SetError(1) 160 | EndIf 161 | 162 | ; Clean up the list view first 163 | _GUICtrlListView_DeleteAllItems($lvPlayList) 164 | ; Clear the array. 165 | Global $aPlayList[0][3] 166 | 167 | Local $EOF = False 168 | While Not $EOF 169 | Local $sLine = FileReadLine($hFile) 170 | If @error Then 171 | $EOF = True 172 | ExitLoop 173 | EndIf 174 | ; Ignore the extra info line 175 | If StringLeft($sLine, 8) = "#EXTINF:" then 176 | $i = UBound($aPlayList) 177 | ReDim $aPlayList[$i+1][3] 178 | ; Add the item to the array. 179 | Local $iPos = StringInStr($sLine, ",", 2) 180 | Local $sTitle = stringmid($sLine, $iPos + 1 ) 181 | Local $iDuration = Int( StringMid($sLine, 9, $iPos-9) ) 182 | $aPlayList[$i][$LIST_TITLE] = $sTitle 183 | $aPlayList[$i][$LIST_DURATION] = $iDuration 184 | $aPlayList[$i][$LIST_FILE] = StringStripWS( FileReadLine($hFile), 3) ; The full file/path 185 | 186 | ; Add the item to the list 187 | Local $iRow = _GUICtrlListView_AddItem($lvPlayList, $i+1) 188 | _GUICtrlListView_SetItemText($lvPlayList, $iRow, $sTitle, 1) 189 | _GUICtrlListView_SetItemText($lvPlayList, $iRow, TimeConvert($iDuration), 2) 190 | _GUICtrlListView_SetItemText($lvPlayList, $iRow, $aPlayList[$i][$LIST_FILE], 3) 191 | EndIf 192 | WEnd 193 | FileClose($hFile) 194 | EndFunc 195 | -------------------------------------------------------------------------------- /source/Forms/Merge2Performers.isf: -------------------------------------------------------------------------------- 1 | ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; 2 | #include 3 | #include 4 | #include 5 | #Include 6 | #include 7 | #include 8 | 9 | $guiMergePerformers = GUICreate("Merge 2 Performers",820,589,-1,-1,-1,-1) 10 | $inpP1 = GUICtrlCreateInput("",329,40,306,36,-1,$WS_EX_CLIENTEDGE) 11 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 12 | GUICtrlCreateLabel("Merge All Performer 1 :",20,40,306,36,-1,-1) 13 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 14 | GUICtrlSetBkColor(-1,"-2") 15 | GUICtrlCreateLabel("Scenes",651,45,123,36,-1,-1) 16 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 17 | GUICtrlSetBkColor(-1,"-2") 18 | $inpP2 = GUICtrlCreateInput("",329,100,306,36,-1,$WS_EX_CLIENTEDGE) 19 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 20 | GUICtrlCreateLabel("Into Performer 2 :",85,100,233,36,-1,-1) 21 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 22 | GUICtrlSetBkColor(-1,"-2") 23 | GUICtrlCreateLabel("Scenes",651,100,113,36,-1,-1) 24 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 25 | GUICtrlSetBkColor(-1,"-2") 26 | GUICtrlCreateLabel("And Make Performer 1 An Alias of Performer 2",130,150,600,41,-1,-1) 27 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 28 | GUICtrlSetBkColor(-1,"-2") 29 | $lstPerformers = GUICtrlCreatelist("",329,203,306,278,-1,$WS_EX_CLIENTEDGE) 30 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 31 | GUICtrlCreateLabel("Performers List"&@crlf&""&@crlf&"(type something"&@crlf&"above to show"&@crlf&"the list)",166,210,152,97,-1,-1) 32 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 33 | GUICtrlSetBkColor(-1,"-2") 34 | $btnOK = GUICtrlCreateButton("OK",176,504,196,52,-1,-1) 35 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 36 | $btnCancel = GUICtrlCreateButton("Cancel",476,504,196,52,-1,-1) 37 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 38 | 39 | 40 | 41 | #cs 42 | [gui] 43 | Handle_deklaration=default 44 | Handle_deklaration_const=false 45 | title=Merge 2 Performers 46 | breite=820 47 | hoehe=589 48 | style=-1 49 | exstyle=-1 50 | bgcolour=0xF0F0F0 51 | bgimage=none 52 | handle=$guiMergePerformers 53 | parent= 54 | code= 55 | codebeforegui= 56 | xpos=-1 57 | ypos=-1 58 | center_gui=true 59 | title_textmode=normal 60 | isf_include_once=false 61 | only_controls_in_isf=false 62 | const_modus=default 63 | gui_code_in_function=false 64 | gui_code_in_function_name= 65 | gui_event_close= 66 | gui_event_minimize= 67 | gui_event_restore= 68 | gui_event_maximize= 69 | gui_event_mousemove= 70 | gui_event_primarydown= 71 | gui_event_primaryup= 72 | gui_event_secoundarydown= 73 | gui_event_secoundaryup= 74 | gui_event_resized= 75 | gui_event_dropped= 76 | defaultfont=MS Sans Serif 77 | defaultfontsize=8 78 | [0x00220132] 79 | type=input 80 | handle=433 81 | locked=0 82 | resize= 83 | x=329 84 | y=40 85 | width=306 86 | height=36 87 | func= 88 | font=Tahoma 89 | fontsize=12 90 | fontstyle=400 91 | fontattribute=0 92 | tooltip= 93 | bgimage= 94 | textcolour=0x000000 95 | id=$inpP1 96 | text= 97 | state=$GUI_SHOW+$GUI_ENABLE 98 | style= 99 | exstyle=$WS_EX_CLIENTEDGE 100 | bgcolour= 101 | code= 102 | order=0 103 | tabpage=-1 104 | iconindex= 105 | iconlarge=0 106 | textmode=text 107 | [0x001C1B20] 108 | type=label 109 | handle=434 110 | locked=0 111 | resize= 112 | x=20 113 | y=40 114 | width=306 115 | height=36 116 | func= 117 | font=Tahoma 118 | fontsize=12 119 | fontstyle=400 120 | fontattribute=0 121 | tooltip= 122 | bgimage= 123 | textcolour=0x000000 124 | id= 125 | text=Merge All Performer 1 : 126 | state=$GUI_SHOW+$GUI_ENABLE 127 | style= 128 | exstyle= 129 | bgcolour=-2 130 | code= 131 | order=2 132 | tabpage=-1 133 | iconindex= 134 | iconlarge=0 135 | textmode=text 136 | [0x00191904] 137 | type=label 138 | handle=435 139 | locked=0 140 | resize= 141 | x=651 142 | y=45 143 | width=123 144 | height=36 145 | func= 146 | font=Tahoma 147 | fontsize=12 148 | fontstyle=400 149 | fontattribute=0 150 | tooltip= 151 | bgimage= 152 | textcolour=0x000000 153 | id= 154 | text=Scenes 155 | state=$GUI_SHOW+$GUI_ENABLE 156 | style= 157 | exstyle= 158 | bgcolour=-2 159 | code= 160 | order=3 161 | tabpage=-1 162 | iconindex= 163 | iconlarge=0 164 | textmode=text 165 | [0x001A1B22] 166 | type=input 167 | handle=436 168 | locked=0 169 | resize= 170 | x=329 171 | y=100 172 | width=306 173 | height=36 174 | func= 175 | font=Tahoma 176 | fontsize=12 177 | fontstyle=400 178 | fontattribute=0 179 | tooltip= 180 | bgimage= 181 | textcolour=0x000000 182 | id=$inpP2 183 | text= 184 | state=$GUI_SHOW+$GUI_ENABLE 185 | style= 186 | exstyle=$WS_EX_CLIENTEDGE 187 | bgcolour= 188 | code= 189 | order=4 190 | tabpage=-1 191 | iconindex= 192 | iconlarge=0 193 | textmode=text 194 | [0x001E18CE] 195 | type=label 196 | handle=437 197 | locked=0 198 | resize= 199 | x=85 200 | y=100 201 | width=233 202 | height=36 203 | func= 204 | font=Tahoma 205 | fontsize=12 206 | fontstyle=400 207 | fontattribute=0 208 | tooltip= 209 | bgimage= 210 | textcolour=0x000000 211 | id= 212 | text=Into Performer 2 : 213 | state=$GUI_SHOW+$GUI_ENABLE 214 | style= 215 | exstyle= 216 | bgcolour=-2 217 | code= 218 | order=5 219 | tabpage=-1 220 | iconindex= 221 | iconlarge=0 222 | textmode=text 223 | [0x00281972] 224 | type=label 225 | handle=438 226 | locked=0 227 | resize= 228 | x=651 229 | y=100 230 | width=113 231 | height=36 232 | func= 233 | font=Tahoma 234 | fontsize=12 235 | fontstyle=400 236 | fontattribute=0 237 | tooltip= 238 | bgimage= 239 | textcolour=0x000000 240 | id= 241 | text=Scenes 242 | state=$GUI_SHOW+$GUI_ENABLE 243 | style= 244 | exstyle= 245 | bgcolour=-2 246 | code= 247 | order=6 248 | tabpage=-1 249 | iconindex= 250 | iconlarge=0 251 | textmode=text 252 | [0x02ED1F98] 253 | type=label 254 | handle=439 255 | locked=0 256 | resize= 257 | x=130 258 | y=150 259 | width=600 260 | height=41 261 | func= 262 | font=Tahoma 263 | fontsize=12 264 | fontstyle=400 265 | fontattribute=0 266 | tooltip= 267 | bgimage= 268 | textcolour=0x000000 269 | id= 270 | text=And Make Performer 1 An Alias of Performer 2 271 | state=$GUI_SHOW+$GUI_ENABLE 272 | style= 273 | exstyle= 274 | bgcolour=-2 275 | code= 276 | order=7 277 | tabpage=-1 278 | iconindex= 279 | iconlarge=0 280 | textmode=text 281 | [0x012C0522] 282 | type=listbox 283 | handle=440 284 | locked=0 285 | resize= 286 | x=329 287 | y=203 288 | width=306 289 | height=278 290 | func= 291 | font=Tahoma 292 | fontsize=12 293 | fontstyle=400 294 | fontattribute=0 295 | tooltip= 296 | bgimage= 297 | textcolour=0x000000 298 | id=$lstPerformers 299 | text= 300 | state=$GUI_SHOW+$GUI_ENABLE 301 | style= 302 | exstyle=$WS_EX_CLIENTEDGE 303 | bgcolour= 304 | code= 305 | order=8 306 | tabpage=-1 307 | iconindex= 308 | iconlarge=0 309 | textmode=text 310 | [0x00311BAA] 311 | type=label 312 | handle=441 313 | locked=0 314 | resize= 315 | x=166 316 | y=210 317 | width=152 318 | height=97 319 | func= 320 | font=Tahoma 321 | fontsize=12 322 | fontstyle=400 323 | fontattribute=0 324 | tooltip= 325 | bgimage= 326 | textcolour=0x000000 327 | id= 328 | text=Performers List[BREAK][BREAK](type something[BREAK]above to show[BREAK]the list) 329 | state=$GUI_SHOW+$GUI_ENABLE 330 | style= 331 | exstyle= 332 | bgcolour=-2 333 | code= 334 | order=9 335 | tabpage=-1 336 | iconindex= 337 | iconlarge=0 338 | textmode=text 339 | [0x000B16FA] 340 | type=button 341 | handle=442 342 | locked=0 343 | resize= 344 | x=176 345 | y=504 346 | width=196 347 | height=52 348 | func= 349 | font=Tahoma 350 | fontsize=12 351 | fontstyle=400 352 | fontattribute=0 353 | tooltip= 354 | bgimage= 355 | textcolour=0x000000 356 | id=$btnOK 357 | text=OK 358 | state=$GUI_SHOW+$GUI_ENABLE 359 | style= 360 | exstyle= 361 | bgcolour= 362 | code= 363 | order=10 364 | tabpage=-1 365 | iconindex= 366 | iconlarge=0 367 | textmode=text 368 | [0x000A021E] 369 | type=button 370 | handle=443 371 | locked=0 372 | resize= 373 | x=476 374 | y=504 375 | width=196 376 | height=52 377 | func= 378 | font=Tahoma 379 | fontsize=12 380 | fontstyle=400 381 | fontattribute=0 382 | tooltip= 383 | bgimage= 384 | textcolour=0x000000 385 | id=$btnCancel 386 | text=Cancel 387 | state=$GUI_SHOW+$GUI_ENABLE 388 | style= 389 | exstyle= 390 | bgcolour= 391 | code= 392 | order=11 393 | tabpage=-1 394 | iconindex= 395 | iconlarge=0 396 | textmode=text 397 | #ce 398 | -------------------------------------------------------------------------------- /source/Forms/Scene2Movie.isf: -------------------------------------------------------------------------------- 1 | ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; 2 | #include 3 | #include 4 | #include 5 | #Include 6 | #include 7 | 8 | If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware") 9 | 10 | $Scene2Movie = GUICreate("Copy Scene Info To Movie",766,968,-1,-1,$WS_SIZEBOX,-1) 11 | GUICtrlCreateLabel("Please choose the information you like to transfer to the movie.",32,23,698,80,-1,-1) 12 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 13 | GUICtrlSetBkColor(-1,"-2") 14 | GUICtrlSetResizing(-1,550) 15 | $lvValues = GUICtrlCreatelistview("#|Properties|Value",32,110,703,282,$LVS_SINGLESEL,BitOr($LVS_EX_FULLROWSELECT,$LVS_EX_CHECKBOXES,$WS_EX_STATICEDGE)) 16 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 17 | GUICtrlSetResizing(-1,550) 18 | _GUICtrlListView_SetColumnWidth($lvValues, 0, 40) 19 | _GUICtrlListView_SetColumnWidth($lvValues, 1, 200) 20 | _GUICtrlListView_SetColumnWidth($lvValues, 2, 450) 21 | GUICtrlCreateListViewItem("1|Title|Just a mocking one", $lvValues) 22 | GUICtrlCreateListViewItem("1|URL|https://localhost:9999/scene/362", $lvValues) 23 | GUICtrlCreateListViewItem("1|Date|2021-10-24", $lvValues) 24 | GUICtrlCreateListViewItem("1|Duration|136 minutes", $lvValues) 25 | GUICtrlCreateListViewItem("1|Details|who needs details when you have the video?", $lvValues) 26 | GUICtrlCreateListViewItem("1|Studio|Studio mocking bird", $lvValues) 27 | $btnOK = GUICtrlCreateButton("OK",548,448,184,54,-1,-1) 28 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 29 | GUICtrlSetResizing(-1,804) 30 | $btnCancel = GUICtrlCreateButton("Cancel",548,516,184,54,-1,-1) 31 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 32 | GUICtrlSetResizing(-1,804) 33 | $imgCover = GUICtrlCreatePic("",29,448,455,314,-1,$WS_EX_STATICEDGE) 34 | GUICtrlSetResizing(-1,102) 35 | $btnBatchCreateStudio = GUICtrlCreateButton("Create movies for scenes in same Studio",100,780,555,51,-1,-1) 36 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 37 | GUICtrlSetTip(-1,"Create movies for all other scenes in the same studio that don't link to a movie yet.") 38 | GUICtrlSetResizing(-1,836) 39 | $btnBatchCreate = GUICtrlCreateButton("Create movies for all other scenes",100,846,555,51,-1,-1) 40 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 41 | GUICtrlSetTip(-1,"Create movies for all other scenes that don't link to a movie yet.") 42 | GUICtrlSetResizing(-1,836) 43 | $chkCover = GUICtrlCreateCheckbox("Cover",39,405,150,33,-1,-1) 44 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 45 | GUICtrlSetResizing(-1,802) 46 | 47 | 48 | 49 | #cs 50 | [gui] 51 | Handle_deklaration=default 52 | Handle_deklaration_const=false 53 | title=Copy Scene Info To Movie 54 | breite=766 55 | hoehe=968 56 | style=$WS_SIZEBOX 57 | exstyle=-1 58 | bgcolour=0xF0F0F0 59 | bgimage=none 60 | handle=$Scene2Movie 61 | parent= 62 | code= 63 | codebeforegui=If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware") 64 | xpos=-1 65 | ypos=-1 66 | center_gui=true 67 | title_textmode=normal 68 | isf_include_once=false 69 | isf_no_includes=false 70 | only_controls_in_isf=false 71 | const_modus=default 72 | gui_code_in_function=false 73 | gui_code_in_function_name= 74 | gui_code_in_function_mode=gui 75 | gui_code_in_function_map_name= 76 | gui_event_close= 77 | gui_event_minimize= 78 | gui_event_restore= 79 | gui_event_maximize= 80 | gui_event_mousemove= 81 | gui_event_primarydown= 82 | gui_event_primaryup= 83 | gui_event_secoundarydown= 84 | gui_event_secoundaryup= 85 | gui_event_resized= 86 | gui_event_dropped= 87 | defaultfont=MS Sans Serif 88 | defaultfontsize=8 89 | [0x0008282E] 90 | type=listview 91 | handle=445 92 | locked=0 93 | resize=550 94 | x=32 95 | y=110 96 | width=703 97 | height=282 98 | func= 99 | font=Tahoma 100 | fontsize=12 101 | fontstyle=400 102 | fontattribute=0 103 | tooltip= 104 | bgimage= 105 | textcolour=0x000000 106 | id=$lvValues 107 | text=#|Properties|Value 108 | state=$GUI_SHOW+$GUI_ENABLE 109 | style=$LVS_SINGLESEL 110 | exstyle=$LVS_EX_FULLROWSELECT+$LVS_EX_CHECKBOXES+$WS_EX_STATICEDGE 111 | bgcolour= 112 | code=_GUICtrlListView_SetColumnWidth($lvValues, 0, 40)[BREAK]_GUICtrlListView_SetColumnWidth($lvValues, 1, 200)[BREAK]_GUICtrlListView_SetColumnWidth($lvValues, 2, 450)[BREAK]GUICtrlCreateListViewItem("1|Title|Just a mocking one", $lvValues)[BREAK]GUICtrlCreateListViewItem("1|URL|https://localhost:9999/scene/362", $lvValues)[BREAK]GUICtrlCreateListViewItem("1|Date|2021-10-24", $lvValues)[BREAK]GUICtrlCreateListViewItem("1|Duration|136 minutes", $lvValues)[BREAK]GUICtrlCreateListViewItem("1|Details|who needs details when you have the video?", $lvValues)[BREAK]GUICtrlCreateListViewItem("1|Studio|Studio mocking bird", $lvValues) 113 | order=1 114 | tabpage=-1 115 | iconindex= 116 | iconlarge=0 117 | textmode=text 118 | [0x00032834] 119 | type=label 120 | handle=446 121 | locked=0 122 | resize=550 123 | x=32 124 | y=23 125 | width=698 126 | height=80 127 | func= 128 | font=Tahoma 129 | fontsize=12 130 | fontstyle=400 131 | fontattribute=0 132 | tooltip= 133 | bgimage= 134 | textcolour=0x000000 135 | id= 136 | text=Please choose the information you like to transfer to the movie. 137 | state=$GUI_SHOW+$GUI_ENABLE 138 | style= 139 | exstyle= 140 | bgcolour=-2 141 | code= 142 | order=0 143 | tabpage=-1 144 | iconindex= 145 | iconlarge=0 146 | textmode=text 147 | [0x00012836] 148 | type=button 149 | handle=447 150 | locked=0 151 | resize=804 152 | x=548 153 | y=448 154 | width=184 155 | height=54 156 | func= 157 | font=Tahoma 158 | fontsize=12 159 | fontstyle=400 160 | fontattribute=0 161 | tooltip= 162 | bgimage= 163 | textcolour=0x000000 164 | id=$btnOK 165 | text=OK 166 | state=$GUI_SHOW+$GUI_ENABLE 167 | style= 168 | exstyle= 169 | bgcolour= 170 | code= 171 | order=4 172 | tabpage=-1 173 | iconindex= 174 | iconlarge=0 175 | textmode=text 176 | [0x00012838] 177 | type=button 178 | handle=448 179 | locked=0 180 | resize=804 181 | x=548 182 | y=516 183 | width=184 184 | height=54 185 | func= 186 | font=Tahoma 187 | fontsize=12 188 | fontstyle=400 189 | fontattribute=0 190 | tooltip= 191 | bgimage= 192 | textcolour=0x000000 193 | id=$btnCancel 194 | text=Cancel 195 | state=$GUI_SHOW+$GUI_ENABLE 196 | style= 197 | exstyle= 198 | bgcolour= 199 | code= 200 | tabpage=-1 201 | iconindex= 202 | iconlarge=0 203 | textmode=text 204 | order=5 205 | [0x0001283A] 206 | type=checkbox 207 | handle=449 208 | locked=0 209 | resize=802 210 | x=39 211 | y=405 212 | width=150 213 | height=33 214 | func= 215 | font=Tahoma 216 | fontsize=12 217 | fontstyle=400 218 | fontattribute=0 219 | tooltip= 220 | bgimage= 221 | textcolour=0x000000 222 | id=$chkCover 223 | text=Cover 224 | state=$GUI_SHOW+$GUI_ENABLE 225 | style= 226 | exstyle= 227 | bgcolour= 228 | code= 229 | order=8 230 | tabpage=-1 231 | iconindex= 232 | iconlarge=0 233 | textmode=text 234 | [0x0001283C] 235 | type=image 236 | handle=450 237 | locked=0 238 | resize=102 239 | x=29 240 | y=448 241 | width=455 242 | height=314 243 | func= 244 | font=Tahoma 245 | fontsize=12 246 | fontstyle=400 247 | fontattribute=0 248 | tooltip= 249 | bgimage= 250 | textcolour=0x000000 251 | id=$imgCover 252 | text= 253 | state=$GUI_SHOW+$GUI_ENABLE 254 | style= 255 | exstyle=$WS_EX_STATICEDGE 256 | bgcolour= 257 | code= 258 | order=7 259 | tabpage=-1 260 | iconindex= 261 | iconlarge=0 262 | textmode=text 263 | [0x0001283E] 264 | type=button 265 | handle=451 266 | locked=0 267 | resize=836 268 | x=100 269 | y=846 270 | width=555 271 | height=51 272 | func= 273 | font=Tahoma 274 | fontsize=12 275 | fontstyle=400 276 | fontattribute=0 277 | tooltip=Create movies for all other scenes that don't link to a movie yet. 278 | bgimage= 279 | textcolour=0x000000 280 | id=$btnBatchCreate 281 | text=Create movies for all other scenes 282 | state=$GUI_SHOW+$GUI_ENABLE 283 | style= 284 | exstyle= 285 | bgcolour= 286 | code= 287 | order=8 288 | tabpage=-1 289 | iconindex= 290 | iconlarge=0 291 | textmode=text 292 | [0x00012840] 293 | type=button 294 | handle=452 295 | locked=0 296 | resize=836 297 | x=100 298 | y=780 299 | width=555 300 | height=51 301 | func= 302 | font=Tahoma 303 | fontsize=12 304 | fontstyle=400 305 | fontattribute=0 306 | tooltip=Create movies for all other scenes in the same studio that don't link to a movie yet. 307 | bgimage= 308 | textcolour=0x000000 309 | id=$btnBatchCreateStudio 310 | text=Create movies for scenes in same Studio 311 | state=$GUI_SHOW+$GUI_ENABLE 312 | style= 313 | exstyle= 314 | bgcolour= 315 | code= 316 | tabpage=-1 317 | iconindex= 318 | iconlarge=0 319 | textmode=text 320 | order=8 321 | #ce 322 | -------------------------------------------------------------------------------- /source/Forms/Scrapers.isf: -------------------------------------------------------------------------------- 1 | ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; 2 | #include 3 | #include 4 | #include 5 | #Include 6 | #include 7 | #include 8 | 9 | If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware") 10 | 11 | $Scrapers = GUICreate("Scrapers Management",1703,1031,-1,-1,BitOr($WS_SIZEBOX,$WS_SYSMENU),-1) 12 | $scraperList = GUICtrlCreatelistview("Website|Scraper|Scene|Gallery|Movie|Performers|Installed|ExtraReq|Contents",40,290,1620,680,-1,BitOr($LVS_EX_FULLROWSELECT,$LVS_EX_GRIDLINES,$LVS_EX_CHECKBOXES,$LVS_EX_DOUBLEBUFFER,$WS_EX_CLIENTEDGE)) 13 | GUICtrlSetFont(-1,10,400,0,"Tahoma") 14 | GUICtrlSetResizing(-1,102) 15 | ; Website 16 | _GUICtrlListView_SetColumnWidth($scraperList, 0, 400) 17 | ; Scraper 18 | _GUICtrlListView_SetColumnWidth($scraperList, 1, 400) 19 | ; Scene 20 | _GUICtrlListView_SetColumnWidth($scraperList, 2, 100) 21 | _GUICtrlListView_JustifyColumn($scraperList, 2, 2) 22 | ; Gallery 23 | _GUICtrlListView_SetColumnWidth($scraperList, 3, 100) 24 | _GUICtrlListView_JustifyColumn($scraperList, 3, 2) 25 | ; Movie 26 | _GUICtrlListView_SetColumnWidth($scraperList, 4, 100) 27 | _GUICtrlListView_JustifyColumn($scraperList, 4, 2) 28 | ; Performer 29 | _GUICtrlListView_SetColumnWidth($scraperList, 5, 130) 30 | _GUICtrlListView_JustifyColumn($scraperList, 5, 2) 31 | ; Installed 32 | _GUICtrlListView_SetColumnWidth($scraperList, 6, 130) 33 | _GUICtrlListView_JustifyColumn($scraperList, 6, 2) 34 | 35 | GUICtrlCreateListViewItem("1000facials.com|GammaEntertainment.yml|√|x|x|x|No", $scraperList) 36 | GUICtrlCreateLabel("Scrapers can fetch information about your scenes, studios, performers, tags...etc. With scrapers, you don't need to type in the information manually any more."&@crlf&" * For performers, you can fetch the info by her/his name."&@crlf&" * For scenes, you put in the URL for that scene, and the scraper can get all the details, including performers, tags, front cover... for that scene."&@crlf&"Therefore, managing scrapers are important for Stash. You don't want too many scrapers, yet you need them to categorize and label your videos quickly.",54,30,1597,205,-1,-1) 37 | GUICtrlSetFont(-1,10,400,0,"Tahoma") 38 | GUICtrlSetBkColor(-1,"-2") 39 | GUICtrlSetResizing(-1,38) 40 | GUICtrlCreateButton("Install",1065,212,167,49,-1,-1) 41 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 42 | GUICtrlSetTip(-1,"Install the scrapers with check marks.") 43 | GUICtrlSetResizing(-1,804) 44 | GUICtrlCreateButton("Remove",1298,212,167,49,-1,-1) 45 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 46 | GUICtrlSetTip(-1,"Remove the scrapers with check marks.") 47 | GUICtrlSetResizing(-1,804) 48 | $inputFilter = GUICtrlCreateInput("",42,218,570,35,-1,$WS_EX_CLIENTEDGE) 49 | GUICtrlSetFont(-1,10,400,0,"Tahoma") 50 | GUICtrlSetResizing(-1,550) 51 | $btnFilter = GUICtrlCreateButton("Find",640,220,148,33,-1,-1) 52 | GUICtrlSetFont(-1,10,400,0,"Tahoma") 53 | GUICtrlSetResizing(-1,804) 54 | GUICtrlCreateButton("Update",1494,212,167,49,-1,-1) 55 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 56 | GUICtrlSetTip(-1,"Update the installed scrapers.") 57 | GUICtrlSetResizing(-1,804) 58 | 59 | 60 | 61 | #cs 62 | [gui] 63 | Handle_deklaration=default 64 | Handle_deklaration_const=false 65 | title=Scrapers Management 66 | breite=1703 67 | hoehe=1031 68 | style=$WS_SIZEBOX+$WS_SYSMENU 69 | exstyle=-1 70 | bgcolour=0xF0F0F0 71 | bgimage=none 72 | handle=$Scrapers 73 | parent= 74 | code= 75 | codebeforegui=If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware") 76 | xpos=-1 77 | ypos=-1 78 | center_gui=true 79 | title_textmode=normal 80 | isf_include_once=false 81 | only_controls_in_isf=false 82 | const_modus=default 83 | gui_code_in_function=false 84 | gui_code_in_function_name= 85 | gui_event_close= 86 | gui_event_minimize= 87 | gui_event_restore= 88 | gui_event_maximize= 89 | gui_event_mousemove= 90 | gui_event_primarydown= 91 | gui_event_primaryup= 92 | gui_event_secoundarydown= 93 | gui_event_secoundaryup= 94 | gui_event_resized= 95 | gui_event_dropped= 96 | defaultfont=MS Sans Serif 97 | defaultfontsize=8 98 | [0x00082646] 99 | type=listview 100 | handle=433 101 | locked=0 102 | resize=102 103 | x=40 104 | y=290 105 | width=1620 106 | height=680 107 | func= 108 | font=Tahoma 109 | fontsize=10 110 | fontstyle=400 111 | fontattribute=0 112 | tooltip= 113 | bgimage= 114 | textcolour=0x000000 115 | id=$scraperList 116 | text=Website|Scraper|Scene|Gallery|Movie|Performers|Installed|ExtraReq|Contents 117 | state=$GUI_SHOW+$GUI_ENABLE 118 | style= 119 | exstyle=$LVS_EX_FULLROWSELECT+$LVS_EX_GRIDLINES+$LVS_EX_CHECKBOXES+$LVS_EX_DOUBLEBUFFER+$WS_EX_CLIENTEDGE 120 | bgcolour= 121 | code=; Website[BREAK]_GUICtrlListView_SetColumnWidth($scraperList, 0, 400)[BREAK]; Scraper[BREAK]_GUICtrlListView_SetColumnWidth($scraperList, 1, 400)[BREAK]; Scene[BREAK]_GUICtrlListView_SetColumnWidth($scraperList, 2, 100)[BREAK]_GUICtrlListView_JustifyColumn($scraperList, 2, 2)[BREAK]; Gallery[BREAK]_GUICtrlListView_SetColumnWidth($scraperList, 3, 100)[BREAK]_GUICtrlListView_JustifyColumn($scraperList, 3, 2)[BREAK]; Movie[BREAK]_GUICtrlListView_SetColumnWidth($scraperList, 4, 100)[BREAK]_GUICtrlListView_JustifyColumn($scraperList, 4, 2)[BREAK]; Performer[BREAK]_GUICtrlListView_SetColumnWidth($scraperList, 5, 130)[BREAK]_GUICtrlListView_JustifyColumn($scraperList, 5, 2)[BREAK]; Installed[BREAK]_GUICtrlListView_SetColumnWidth($scraperList, 6, 130)[BREAK]_GUICtrlListView_JustifyColumn($scraperList, 6, 2)[BREAK][BREAK]GUICtrlCreateListViewItem("1000facials.com|GammaEntertainment.yml|√|x|x|x|No", $scraperList) 122 | order=0 123 | tabpage=-1 124 | iconindex= 125 | iconlarge=0 126 | textmode=text 127 | [0x0003264C] 128 | type=label 129 | handle=434 130 | locked=0 131 | resize=38 132 | x=54 133 | y=30 134 | width=1597 135 | height=205 136 | func= 137 | font=Tahoma 138 | fontsize=10 139 | fontstyle=400 140 | fontattribute=0 141 | tooltip= 142 | bgimage= 143 | textcolour=0x000000 144 | id= 145 | text=Scrapers can fetch information about your scenes, studios, performers, tags...etc. With scrapers, you don't need to type in the information manually any more.[BREAK] * For performers, you can fetch the info by her/his name.[BREAK] * For scenes, you put in the URL for that scene, and the scraper can get all the details, including performers, tags, front cover... for that scene.[BREAK]Therefore, managing scrapers are important for Stash. You don't want too many scrapers, yet you need them to categorize and label your videos quickly. 146 | state=$GUI_SHOW+$GUI_ENABLE 147 | style= 148 | exstyle= 149 | bgcolour=-2 150 | code= 151 | order=2 152 | tabpage=-1 153 | iconindex= 154 | iconlarge=0 155 | textmode=text 156 | [0x0001264E] 157 | type=button 158 | handle=435 159 | locked=0 160 | resize=804 161 | x=1065 162 | y=212 163 | width=167 164 | height=49 165 | func= 166 | font=Tahoma 167 | fontsize=12 168 | fontstyle=400 169 | fontattribute=0 170 | tooltip=Install the scrapers with check marks. 171 | bgimage= 172 | textcolour=0x000000 173 | id= 174 | text=Install 175 | state=$GUI_SHOW+$GUI_ENABLE 176 | style= 177 | exstyle= 178 | bgcolour= 179 | code= 180 | order=3 181 | tabpage=-1 182 | iconindex= 183 | iconlarge=0 184 | textmode=text 185 | [0x00012650] 186 | type=button 187 | handle=436 188 | locked=0 189 | resize=804 190 | x=1298 191 | y=212 192 | width=167 193 | height=49 194 | func= 195 | font=Tahoma 196 | fontsize=12 197 | fontstyle=400 198 | fontattribute=0 199 | tooltip=Remove the scrapers with check marks. 200 | bgimage= 201 | textcolour=0x000000 202 | id= 203 | text=Remove 204 | state=$GUI_SHOW+$GUI_ENABLE 205 | style= 206 | exstyle= 207 | bgcolour= 208 | code= 209 | tabpage=-1 210 | order=4 211 | iconindex= 212 | iconlarge=0 213 | textmode=text 214 | [0x00012652] 215 | type=input 216 | handle=437 217 | locked=0 218 | resize=550 219 | x=42 220 | y=218 221 | width=570 222 | height=35 223 | func= 224 | font=Tahoma 225 | fontsize=10 226 | fontstyle=400 227 | fontattribute=0 228 | tooltip= 229 | bgimage= 230 | textcolour=0x000000 231 | id=$inputFilter 232 | text= 233 | state=$GUI_SHOW+$GUI_ENABLE 234 | style= 235 | exstyle=$WS_EX_CLIENTEDGE 236 | bgcolour= 237 | code= 238 | order=5 239 | tabpage=-1 240 | iconindex= 241 | iconlarge=0 242 | textmode=text 243 | [0x00012654] 244 | type=button 245 | handle=438 246 | locked=0 247 | resize=804 248 | x=640 249 | y=220 250 | width=148 251 | height=33 252 | func= 253 | font=Tahoma 254 | fontsize=10 255 | fontstyle=400 256 | fontattribute=0 257 | tooltip= 258 | bgimage= 259 | textcolour=0x000000 260 | id=$btnFilter 261 | text=Find 262 | state=$GUI_SHOW+$GUI_ENABLE 263 | style= 264 | exstyle= 265 | bgcolour= 266 | code= 267 | order=6 268 | tabpage=-1 269 | iconindex= 270 | iconlarge=0 271 | textmode=text 272 | [0x00012656] 273 | type=button 274 | handle=439 275 | locked=0 276 | resize=804 277 | x=1494 278 | y=212 279 | width=167 280 | height=49 281 | func= 282 | font=Tahoma 283 | fontsize=12 284 | fontstyle=400 285 | fontattribute=0 286 | tooltip=Update the installed scrapers. 287 | bgimage= 288 | textcolour=0x000000 289 | id= 290 | text=Update 291 | state=$GUI_SHOW+$GUI_ENABLE 292 | style= 293 | exstyle= 294 | bgcolour= 295 | code= 296 | tabpage=-1 297 | iconindex= 298 | iconlarge=0 299 | textmode=text 300 | order=7 301 | #ce 302 | -------------------------------------------------------------------------------- /source/TrayMenuEx.au3: -------------------------------------------------------------------------------- 1 | ; FILE: TrayMenuEx.au3 2 | ; VESION: 1.0.0 3 | ; LAST EDIT: 30 Mar 2006 4 | ; PURPOSE: Provide udf's to extend TrayMenu functionality. 5 | ; Image support is implemented 6 | ; 7 | ; RESOURCES: Scopinho: http://www.autoitscript.com/forum/index.php?showtopic=20798&hl=AddImageToMenu 8 | ; RESOURCES: MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_icons.asp 9 | ; CREATED BY: Uten: http://www.autoitscript.com/forum/index.php?showuser=7836 10 | ; TODO: 11 | ; --------------------------------------------------------------------- 12 | ; * Add support to get the icon viewed in explorer for any exe. 13 | ; --------------------------------------------------------------------- 14 | ; CHANGE LOG: 15 | ; --------------------------------------------------------------------- 16 | ; uten 30 Mar 2006 First release. 17 | ; --------------------------------------------------------------------- 18 | #cs - User calltip entries: Tools->User calltip entries 19 | _LoadImage($imagePathName, $imageType) Returns handel to image in memory. Load image from a image file (bmp, ico). Set $imageType as $IMAGE_BITMAP=0 or $IMAGE_ICON=1 20 | _TrayMenuAddIcon(ByRef $hIcon, $TrayMenuNr[, $ParentMenu = 0[, $IndexType = 0x00000400]] ) Add, bitmap in, icon to a tray item. $hIco: Handel to icon in memory. $TrayMenuNr: TrayItems index nr in menu.First item is 0. $ParentMenu: controlID returned by TrayCreateMenu. $IndexType: $MF_BYPOSITION | $MF_BYCOMMAND Changes behaviour of $TrayMenuNr 21 | _TrayMenuAddImage( ByRef $hBmp, $MenuIndex[, $ParentMenu = 0[, $IndexType = 0x00000400]] )Add bitmap to a tray item. $hBmp: Handel to bitmap in memory. $TrayMenuNr: TrayItems index nr in menu.First item is 0. $ParentMenu: controlID returned by TrayCreateMenu. $IndexType: $MF_BYPOSITION | $MF_BYCOMMAND Changes behaviour of $TrayMenuNr 22 | _IconExtractFromFile($szIconFile, $iconID) Extract icon from file. $szIconFile: PathName to file (dll or exe) containing the icon. $iconID: Resource reference in the file. 23 | _IconDestroy(ByRef $hIcon) Destroy icon in memory. $hIcon may be a array of handels. Could be called after the icon has been pased on to menuItem. 24 | _IconGetInfo( ByRef $hIcon, ByRef $structICONINFO) $hIcon: Handel to icon in memory. $structICONINFO: A array resembeling the ICONSTRUCT structure. item 5 is a handel to the bitmap. 25 | _GetMenuItemID($hMenu, $itemRelativePos) Returns itemID of a item in menu $hMenu with relative pos $itemRelativePos. 26 | #ce 27 | 28 | #include 29 | #include-once 30 | 31 | ; --------------------------------------------------------------------- 32 | ; Global Const $MF_BYCOMMAND = 0x00000000 ; In 33 | ; Global Const $MF_BYPOSITION = 0x00000400 ; In 34 | 35 | ; Global Const $IMAGE_BITMAP = 0 36 | ; Global Const $IMAGE_ICON = 1 37 | 38 | ; Global Const $LR_LOADMAP3DCOLORS = 0x00001000 39 | ; Global Const $LR_LOADFROMFILE = 0x0010 40 | ; 41 | Global Const $Debug = 1 42 | Global Const $ModuleName = "TrayMenuEx.au3" 43 | ; --------------------------------------------------------------------- 44 | #cs TEST CODE: 45 | 46 | _Main() 47 | Func _Main() 48 | Opt("TrayMenuMode", 1) ; Don't show the default tray context menu 49 | local $autoitIcons="C:\Program Files (x86)" & "\Autoit3\icons\" 50 | local $bmpPathName = "c:\temp\test.bmp" 51 | local $IExplorerPath = "c:\program files\internet explorer\iexplorer.exe" 52 | local $TMControlIDs[8], $hImg[8] 53 | ; Create a menu structure 54 | $TMControlIDs[0] = TrayCreateMenu("Options") 55 | $TMControlIDs[1] = TrayCreateItem("Opt1",$TMControlIDs[0]) 56 | $TMControlIDs[2] = TrayCreateItem("Opt2",$TMControlIDs[0]) 57 | $TMControlIDs[3] = TrayCreateItem("") 58 | 59 | $TMControlIDs[4] = TrayCreateItem("Test1") 60 | $TMControlIDs[5] = TrayCreateItem("IExplorer") 61 | $TMControlIDs[6] = TrayCreateItem("") 62 | $TMControlIDs[7] = TrayCreateItem("Exit") 63 | ; Add some icons 64 | 65 | $hImg[0] = _IconExtractFromFile("shell32.dll", 15) ; Computer icon in dll 66 | $hImg[1] = _LoadImage($autoitIcons & "MyAutoIt3_Blue.ico", $IMAGE_ICON) 67 | $hImg[2] = _LoadImage($autoitIcons & "MyAutoIt3_Green.ico", $IMAGE_ICON) 68 | $hImg[4] = _IconExtractFromFile(@AutoItExe, 0) ; This does not work for all files (ex:firefox). Even if the item reference is correct 69 | $hImg[5] = _IconExtractFromFile($IExplorerPath, 32528) 70 | $hImg[7] = _LoadImage($bmpPathName, $IMAGE_BITMAP) 71 | 72 | _TrayMenuAddIcon($hImg[0], 0) ; CReate a submenu 73 | _TrayMenuAddIcon($hImg[1], 0,$TMControlIDs[0]) ; First item on the sub menu 74 | _TrayMenuAddIcon($hImg[2], 1,$TMControlIDs[0]) ; Second on sub menu 75 | ;_TrayMenuAddIcon($hImg[3], 1) ; Seperator, between submenu and root 76 | _TrayMenuAddIcon($hImg[4], 2) ; Test1, expect Autoit icon 77 | _TrayMenuAddIcon($hImg[5], 3) ; IExplorer 78 | ;_TrayMenuAddIcon($hImg[6], 4) ; Seperator 79 | _TrayMenuAddImage($hImg[7], 5) ; Exit, expect blue bmp 80 | 81 | TraySetState() 82 | ; We can destroy the icon references after it has been loaded by the TrayItem 83 | _IconDestroy($hImg) ;Destroys handel or array of handels 84 | 85 | local $msg, $TrayMsg 86 | While 1 87 | if TrayGetMsg()= $TMControlIDs[7] then Exit 88 | $msg = GUIGetMsg() 89 | switch $msg 90 | case $GUI_EVENT_CLOSE 91 | exit 92 | case Else 93 | If $msg = 0 Then 94 | ;sleep(250) 95 | Else 96 | if $debug then ConsoleWrite("MSG LOOP: $msg:=" & $msg & @LF) 97 | EndIf 98 | EndSwitch 99 | 100 | WEnd 101 | 102 | EndFunc ;==>_Main 103 | #ce 104 | ; --------------------------------------------------------------------- 105 | Func _LoadImage($imagePathName, $imageType) 106 | ; $imageType=[$IMAGE_BITMAP|$IMAGE_ICON] 107 | ; Loads image to memory, returns pointer 108 | If $Debug AND Not FileExists($imagePathName) Then ConsoleWrite($ModuleName & _ 109 | " ERROR: _LoadImage($imagePathName:=" & _ 110 | $imagePathName & ", $imageType:="& $imageType & _ 111 | ") File does not exist" & @LF) 112 | Local $hRet = DllCall("user32.dll", "hwnd", "LoadImage", "hwnd", 0, _ 113 | "str", $imagePathName, _ 114 | "int", $imageType, _ 115 | "int", 0, _ 116 | "int", 0, _ 117 | "int", BitOR($LR_LOADFROMFILE, $LR_LOADMAP3DCOLORS)) 118 | ; TODO: Consider LR_LOADTRANSPARENT, LR_SHARED 119 | if $Debug AND $hRet[0] = 0 Then ConsoleWrite($ModuleName & _ 120 | " ERROR: _LoadImage($imagePathName:=" & _ 121 | $imagePathName & ", $imageType:="& $imageType & _ 122 | ") Did not return img handel." & @LF) 123 | $hRet = $hRet[0] 124 | Return $hRet 125 | EndFunc 126 | 127 | Func _TrayMenuAddIcon(ByRef $hIcon, $TrayMenuNr, $ParentMenu = 0, $IndexType = 0x00000400 ); $MF_POSITION=0x00000400 128 | dim $pIcoInfo, $hBmp 129 | If _IconGetInfo($hIcon, $pIcoInfo) <> 0 Then 130 | ; Get a handel to the bmp in the icon def. 131 | $hBmp = DllStructGetData($pIcoInfo,5) 132 | _TrayMenuAddImage($hBmp, $TrayMenuNr, $ParentMenu, $IndexType) 133 | $pIcoInfo = 0 134 | Else 135 | If $Debug Then ConsoleWrite($ModuleName & " ERROR: In _TrayMenuAddIcon($hIcon:=" & $hIcon & _ 136 | ", $TrayMenuNr:=" & $TrayMenuNr _ 137 | & ") Call to _GetIconInfo Trying to use $hIcon as bmp handel" & @LF) 138 | _TrayMenuAddImage($hIcon, $TrayMenuNr, $ParentMenu, $IndexType) 139 | EndIf 140 | EndFunc ; ==>_TrayMenuAddIcon 141 | 142 | Func _TrayMenuAddImage( ByRef $hBmp, $MenuIndex, $ParentMenu = 0, $IndexType = 0x00000400 ); $MF_POSITION=0x00000400 143 | if $Debug Then ConsoleWrite("_TrayMenuAddIcon( $hBmp:=" & $hBmp & ", $MenuIndex:=" & _ 144 | $MenuIndex & ", $ParentMenu:=" & $ParentMenu & ", $IndexType:=" & $IndexType &" )" & @LF) 145 | local $ret = DllCall("user32.dll", "int", "SetMenuItemBitmaps", "hwnd", TrayItemGetHandle($ParentMenu), _ 146 | "int", $MenuIndex, _ 147 | "int", $IndexType, _ 148 | "hwnd", $hBmp, _ 149 | "hwnd", $hBmp) 150 | EndFunc ; ==>_TrayMenuAddImage 151 | 152 | Func _IconExtractFromFile($szIconFile, $iconID) 153 | ; TODO: This will not extract icons (as in a embeded resource) from a normal exe. 154 | Local $hIcon = DllStructCreate("int") 155 | ;PROTO: UINT ExtractIconEx(LPCTSTR lpszFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons); 156 | Local $result = DllCall("shell32.dll", "hwnd", "ExtractIconEx", "str", $szIconFile, "int", $iconID, "hwnd", 0, "ptr", DllStructGetPtr($hIcon), "int", 1) 157 | ;TODO: Do we have to make shure some cleanup is done? Or will the memory bee freed when Autoit terminates 158 | Local $ret = DllStructGetData($hIcon,1) 159 | Return $ret 160 | EndFunc ; ==> _IconExtractFromFile 161 | 162 | Func _IconDestroy(ByRef $hIcon) 163 | if IsArray($hIcon) Then 164 | local $i 165 | For $i = 0 to UBound($hIcon) - 1 166 | DllCall("user32.dll", "int", "DestroyIcon", "hwnd", DllStructGetPtr($hIcon[$i])) 167 | Next 168 | else 169 | DllCall("user32.dll", "int", "DestroyIcon", "hwnd", DllStructGetPtr($hIcon)) 170 | EndIf 171 | EndFunc ; ==>_IconDestroy 172 | 173 | Func _IconGetInfo( ByRef $hIcon, ByRef $structICONINFO) 174 | local $def = "int; dword; dword; ptr; ptr" 175 | $structICONINFO = DllStructCreate($def) 176 | ; PROTO: BOOL GetIconInfo( HICON hIcon, PICONINFO piconinfo); 177 | Local $ret = DllCall("user32.dll", "long", "GetIconInfo","ptr", $hIcon, "ptr", DllStructGetPtr($structICONINFO)) 178 | if $Debug AND @error <> 0 then ConsoleWrite( $ModuleName & "_IconGetInfo: @ERROR:=" & @error & @CRLF & _ 179 | "@ERROR:=1 > unable to use the DLL file: user32.dll" & @CRLF & _ 180 | "@ERROR:=2 > unknown return type" & @CRLF & _ 181 | "@ERROR:=3 > function: GetIconInfo not found in user32.dll" & @LF) 182 | ; 0 Is failure andything else is success. 183 | return $ret[0] 184 | EndFunc ; ==> _IconGEtInfo 185 | 186 | Func _GetMenuItemID($hMenu, $itemRelativePos) 187 | ;PROTO: UINT GetMenuItemID( HMENU hMenu, int nPos); 188 | local $ret = dllcall("", "int", "GetMenuItemID","hwnd", $hMenu, "int", $itemRelativePos) 189 | Return $ret[0] 190 | EndFunc 191 | ; --------------------------------------------------------------------- -------------------------------------------------------------------------------- /source/Forms/CopySceneInfo.isf: -------------------------------------------------------------------------------- 1 | ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; 2 | #include 3 | #include 4 | #include 5 | #Include 6 | #include 7 | #include 8 | 9 | Func _guiCopySceneInfo() 10 | Local $mguiCopySceneInfo[] 11 | $guiCopySceneInfo = GUICreate("Copy Scene Information From another Scene",923,1200,-1,-1,BitOr($WS_SIZEBOX,$WS_SYSMENU,$WS_DLGFRAME,$WS_BORDER),$WS_EX_TOPMOST) 12 | $mguiCopySceneInfo["guiCopySceneInfo"] = $guiCopySceneInfo 13 | GUICtrlCreateLabel("1. Find the scene ID you want to copy from."&@crlf&"For example, if a scene's URL is 'http://localhost:9999/scenes/123', then the scene ID is '123'.",40,110,866,117,-1,-1) 14 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 15 | GUICtrlSetBkColor(-1,"-2") 16 | GUICtrlSetResizing(-1,550) 17 | GUICtrlCreateLabel("Scene ID",101,234,121,41,-1,-1) 18 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 19 | GUICtrlSetBkColor(-1,"-2") 20 | GUICtrlSetResizing(-1,546) 21 | $inputSceneID = GUICtrlCreateInput("1",237,230,215,45,-1,$WS_EX_CLIENTEDGE) 22 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 23 | GUICtrlSetResizing(-1,802) 24 | $mguiCopySceneInfo["inputSceneID"] = $inputSceneID 25 | $lbCurrentSceneID = GUICtrlCreateLabel("Current Scene ID:",40,9,851,43,-1,-1) 26 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 27 | GUICtrlSetBkColor(-1,"-2") 28 | GUICtrlSetResizing(-1,550) 29 | $mguiCopySceneInfo["lbCurrentSceneID"] = $lbCurrentSceneID 30 | $lbCurrentTitle = GUICtrlCreateLabel("Current Title:",40,55,851,43,-1,-1) 31 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 32 | GUICtrlSetBkColor(-1,"-2") 33 | GUICtrlSetResizing(-1,550) 34 | $mguiCopySceneInfo["lbCurrentTitle"] = $lbCurrentTitle 35 | GUICtrlCreateLabel("2. Choose the info you want to copy over.",46,300,791,46,-1,-1) 36 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 37 | GUICtrlSetBkColor(-1,"-2") 38 | GUICtrlSetResizing(-1,802) 39 | $lvSceneValues = GUICtrlCreatelistview("#|Property|Value",50,360,798,407,-1,$WS_EX_CLIENTEDGE) 40 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 41 | GUICtrlSetResizing(-1,550) 42 | $mguiCopySceneInfo["lvSceneValues"] = $lvSceneValues 43 | GUICtrlCreateCheckbox("Cover",58,790,164,40,-1,-1) 44 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 45 | GUICtrlSetResizing(-1,34) 46 | $imgCover = GUICtrlCreatePic("",58,843,514,306,-1,$WS_EX_STATICEDGE) 47 | GUICtrlSetResizing(-1,102) 48 | $mguiCopySceneInfo["imgCover"] = $imgCover 49 | $btnOK = GUICtrlCreateButton("OK",640,997,208,61,-1,-1) 50 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 51 | GUICtrlSetTip(-1,"Copy the info you choose to the current scene.") 52 | GUICtrlSetResizing(-1,836) 53 | $mguiCopySceneInfo["btnOK"] = $btnOK 54 | $btnCancel = GUICtrlCreateButton("Cancel",640,1088,208,61,-1,-1) 55 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 56 | GUICtrlSetResizing(-1,836) 57 | $mguiCopySceneInfo["btnCancel"] = $btnCancel 58 | $btnGetInfo = GUICtrlCreateButton("Get Info",480,227,184,43,-1,-1) 59 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 60 | GUICtrlSetResizing(-1,802) 61 | $mguiCopySceneInfo["btnGetInfo"] = $btnGetInfo 62 | return $mguiCopySceneInfo 63 | EndFunc 64 | 65 | 66 | 67 | #cs 68 | [gui] 69 | Handle_deklaration=default 70 | Handle_deklaration_const=false 71 | title=Copy Scene Information From another Scene 72 | breite=923 73 | hoehe=1200 74 | style=$WS_SIZEBOX+$WS_SYSMENU+$WS_DLGFRAME+$WS_BORDER 75 | exstyle=$WS_EX_TOPMOST 76 | bgcolour=0xF0F0F0 77 | bgimage=none 78 | handle=$guiCopySceneInfo 79 | parent= 80 | code= 81 | codebeforegui= 82 | xpos=-1 83 | ypos=-1 84 | center_gui=true 85 | title_textmode=normal 86 | isf_include_once=false 87 | isf_no_includes=false 88 | only_controls_in_isf=false 89 | const_modus=default 90 | gui_code_in_function=true 91 | gui_code_in_function_name=_guiCopySceneInfo() 92 | gui_code_in_function_mode=map 93 | gui_code_in_function_map_name=$mguiCopySceneInfo 94 | gui_event_close= 95 | gui_event_minimize= 96 | gui_event_restore= 97 | gui_event_maximize= 98 | gui_event_mousemove= 99 | gui_event_primarydown= 100 | gui_event_primaryup= 101 | gui_event_secoundarydown= 102 | gui_event_secoundaryup= 103 | gui_event_resized= 104 | gui_event_dropped= 105 | defaultfont=MS Sans Serif 106 | defaultfontsize=8 107 | [0x000B2BE0] 108 | type=label 109 | handle=445 110 | locked=0 111 | resize=550 112 | x=40 113 | y=110 114 | width=866 115 | height=117 116 | func= 117 | font=Tahoma 118 | fontsize=12 119 | fontstyle=400 120 | fontattribute=0 121 | tooltip= 122 | bgimage= 123 | textcolour=0x000000 124 | id= 125 | text=1. Find the scene ID you want to copy from.[BREAK]For example, if a scene's URL is 'http://localhost:9999/scenes/123', then the scene ID is '123'. 126 | state=$GUI_SHOW+$GUI_ENABLE 127 | style= 128 | exstyle= 129 | bgcolour=-2 130 | code= 131 | order=0 132 | tabpage=-1 133 | iconindex= 134 | iconlarge=0 135 | textmode=text 136 | [0x00032BDE] 137 | type=label 138 | handle=446 139 | locked=0 140 | resize=546 141 | x=101 142 | y=234 143 | width=121 144 | height=41 145 | func= 146 | font=Tahoma 147 | fontsize=12 148 | fontstyle=400 149 | fontattribute=0 150 | tooltip= 151 | bgimage= 152 | textcolour=0x000000 153 | id= 154 | text=Scene ID 155 | state=$GUI_SHOW+$GUI_ENABLE 156 | style= 157 | exstyle= 158 | bgcolour=-2 159 | code= 160 | order=2 161 | tabpage=-1 162 | iconindex= 163 | iconlarge=0 164 | textmode=text 165 | [0x00022BDC] 166 | type=input 167 | handle=447 168 | locked=0 169 | resize=802 170 | x=237 171 | y=230 172 | width=215 173 | height=45 174 | func= 175 | font=Tahoma 176 | fontsize=12 177 | fontstyle=400 178 | fontattribute=0 179 | tooltip= 180 | bgimage= 181 | textcolour=0x000000 182 | id=$inputSceneID 183 | text=1 184 | state=$GUI_SHOW+$GUI_ENABLE 185 | style= 186 | exstyle=$WS_EX_CLIENTEDGE 187 | bgcolour= 188 | code= 189 | order=3 190 | tabpage=-1 191 | iconindex= 192 | iconlarge=0 193 | textmode=text 194 | [0x00022C18] 195 | type=label 196 | handle=448 197 | locked=0 198 | resize=550 199 | x=40 200 | y=9 201 | width=851 202 | height=43 203 | func= 204 | font=Tahoma 205 | fontsize=12 206 | fontstyle=400 207 | fontattribute=0 208 | tooltip= 209 | bgimage= 210 | textcolour=0x000000 211 | id=$lbCurrentSceneID 212 | text=Current Scene ID: 213 | state=$GUI_SHOW+$GUI_ENABLE 214 | style= 215 | exstyle= 216 | bgcolour=-2 217 | code= 218 | order=4 219 | tabpage=-1 220 | iconindex= 221 | iconlarge=0 222 | textmode=text 223 | [0x00022C1A] 224 | type=label 225 | handle=449 226 | locked=0 227 | resize=550 228 | x=40 229 | y=55 230 | width=851 231 | height=43 232 | func= 233 | font=Tahoma 234 | fontsize=12 235 | fontstyle=400 236 | fontattribute=0 237 | tooltip= 238 | bgimage= 239 | textcolour=0x000000 240 | id=$lbCurrentTitle 241 | text=Current Title: 242 | state=$GUI_SHOW+$GUI_ENABLE 243 | style= 244 | exstyle= 245 | bgcolour=-2 246 | code= 247 | tabpage=-1 248 | iconindex= 249 | iconlarge=0 250 | textmode=text 251 | order=5 252 | [0x00092C1C] 253 | type=label 254 | handle=450 255 | locked=0 256 | resize=802 257 | x=46 258 | y=300 259 | width=791 260 | height=46 261 | func= 262 | font=Tahoma 263 | fontsize=12 264 | fontstyle=400 265 | fontattribute=0 266 | tooltip= 267 | bgimage= 268 | textcolour=0x000000 269 | id= 270 | text=2. Choose the info you want to copy over. 271 | state=$GUI_SHOW+$GUI_ENABLE 272 | style= 273 | exstyle= 274 | bgcolour=-2 275 | code= 276 | order=6 277 | tabpage=-1 278 | iconindex= 279 | iconlarge=0 280 | textmode=text 281 | [0x00D7099A] 282 | type=listview 283 | handle=451 284 | locked=0 285 | resize=550 286 | x=50 287 | y=360 288 | width=798 289 | height=407 290 | func= 291 | font=Tahoma 292 | fontsize=12 293 | fontstyle=400 294 | fontattribute=0 295 | tooltip= 296 | bgimage= 297 | textcolour=0x000000 298 | id=$lvSceneValues 299 | text=#|Property|Value 300 | state=$GUI_SHOW+$GUI_ENABLE 301 | style= 302 | exstyle=$WS_EX_CLIENTEDGE 303 | bgcolour= 304 | code= 305 | order=7 306 | tabpage=-1 307 | iconindex= 308 | iconlarge=0 309 | textmode=text 310 | [0x00AE0784] 311 | type=checkbox 312 | handle=452 313 | locked=0 314 | resize=34 315 | x=58 316 | y=790 317 | width=164 318 | height=40 319 | func= 320 | font=Tahoma 321 | fontsize=12 322 | fontstyle=400 323 | fontattribute=0 324 | tooltip= 325 | bgimage= 326 | textcolour=0x000000 327 | id= 328 | text=Cover 329 | state=$GUI_SHOW+$GUI_ENABLE 330 | style= 331 | exstyle= 332 | bgcolour= 333 | code= 334 | order=8 335 | tabpage=-1 336 | iconindex= 337 | iconlarge=0 338 | textmode=text 339 | [0x00291658] 340 | type=image 341 | handle=453 342 | locked=0 343 | resize=102 344 | x=58 345 | y=843 346 | width=514 347 | height=306 348 | func= 349 | font=Tahoma 350 | fontsize=12 351 | fontstyle=400 352 | fontattribute=0 353 | tooltip= 354 | bgimage= 355 | textcolour=0x000000 356 | id=$imgCover 357 | text= 358 | state=$GUI_SHOW+$GUI_ENABLE 359 | style= 360 | exstyle=$WS_EX_STATICEDGE 361 | bgcolour=0xC0C0C0 362 | code= 363 | order=9 364 | tabpage=-1 365 | iconindex= 366 | iconlarge=0 367 | textmode=text 368 | [0x00211ED0] 369 | type=button 370 | handle=454 371 | locked=0 372 | resize=836 373 | x=640 374 | y=997 375 | width=208 376 | height=61 377 | func= 378 | font=Tahoma 379 | fontsize=12 380 | fontstyle=400 381 | fontattribute=0 382 | tooltip=Copy the info you choose to the current scene. 383 | bgimage= 384 | textcolour=0x000000 385 | id=$btnOK 386 | text=OK 387 | state=$GUI_SHOW+$GUI_ENABLE 388 | style= 389 | exstyle= 390 | bgcolour= 391 | code= 392 | order=10 393 | tabpage=-1 394 | iconindex= 395 | iconlarge=0 396 | textmode=text 397 | [0x004E2098] 398 | type=button 399 | handle=455 400 | locked=0 401 | resize=836 402 | x=640 403 | y=1088 404 | width=208 405 | height=61 406 | func= 407 | font=Tahoma 408 | fontsize=12 409 | fontstyle=400 410 | fontattribute=0 411 | tooltip= 412 | bgimage= 413 | textcolour=0x000000 414 | id=$btnCancel 415 | text=Cancel 416 | state=$GUI_SHOW+$GUI_ENABLE 417 | style= 418 | exstyle= 419 | bgcolour= 420 | code= 421 | tabpage=-1 422 | iconindex= 423 | iconlarge=0 424 | textmode=text 425 | order=11 426 | [0x010D065A] 427 | type=button 428 | handle=456 429 | locked=0 430 | resize=802 431 | x=480 432 | y=227 433 | width=184 434 | height=43 435 | func= 436 | font=Tahoma 437 | fontsize=12 438 | fontstyle=400 439 | fontattribute=0 440 | tooltip= 441 | bgimage= 442 | textcolour=0x000000 443 | id=$btnGetInfo 444 | text=Get Info 445 | state=$GUI_SHOW+$GUI_ENABLE 446 | style= 447 | exstyle= 448 | bgcolour= 449 | code= 450 | order=12 451 | tabpage=-1 452 | iconindex= 453 | iconlarge=0 454 | textmode=text 455 | #ce 456 | -------------------------------------------------------------------------------- /source/Forms/InitialSettingsForm.au3: -------------------------------------------------------------------------------- 1 | ;InitialSettingsForm.au3 2 | #include 3 | #include 4 | #include 5 | #Include 6 | #include 7 | #include 8 | 9 | Func InitialSettingsForm() 10 | 11 | ; Global $stashType = RegRead($gsRegBase, "StashType") 12 | ; Global $stashURL = RegRead($gsRegBase, "StashURL") 13 | Global $stashBrowser = RegRead($gsRegBase, "Browser") 14 | Global $stashFilePath = RegRead($gsRegBase, "StashFilePath") 15 | Global $stashURL = RegRead($gsRegBase, "StashURL") 16 | 17 | ; Create the whole initial setting's GUI 18 | Local $Initial_Settings = GUICreate("Initial Settings",1326,809,-1,-1,-1,-1) 19 | GUISetIcon("helper2.ico") 20 | 21 | Local $tab = GUICtrlCreatetab(41,70,1201,673,-1,-1) 22 | 23 | ; Tab 1 24 | GUICtrlCreateTabItem(" Start ") 25 | 26 | GUICtrlCreateLabel("Welcome to my little GUI helper for Stash!",191,117,908,62,-1,-1) 27 | GUICtrlSetFont(-1,20,400,0,"Palatino Linotype") 28 | GUICtrlSetBkColor(-1,"-2") 29 | 30 | GUICtrlCreateLabel("StashApp is a great program to manage your porn collection. This little helper will make it easier to run in Windows.", _ 31 | 166,193,937,75,-1,-1) 32 | GUICtrlSetFont(-1,12,400,0,"Palatino Linotype") 33 | GUICtrlSetBkColor(-1,"-2") 34 | 35 | ; Group for choosing local or remote 36 | GUICtrlCreateGroup("Please start it by tell me which type of Stash you are running",139,280,1028,326,-1,-1) 37 | GUICtrlSetFont(-1,12,400,0,"Palatino Linotype") 38 | 39 | GUICtrlCreateLabel("Location:",279,418,101,28,-1,-1) 40 | GUICtrlSetFont(-1,10,400,0,"Tahoma") 41 | GUICtrlSetBkColor(-1,"-2") 42 | 43 | Local $radioLocal = GUICtrlCreateRadio("Local Stash by running stash-win.exe.",219,359,501,42,-1,-1) 44 | GUICtrlSetFont(-1,12,400,0,"Palatino Linotype") 45 | GUICtrlSetBkColor(-1,"0xFFFFFF") 46 | If $stashType = "Local" Then GUICtrlSetState( -1, $GUI_CHECKED ) 47 | 48 | Local $radioRemote = GUICtrlCreateRadio("Remote Stash",219,474,501,51,-1,-1) 49 | GUICtrlSetFont(-1,12,400,0,"Palatino Linotype") 50 | GUICtrlSetBkColor(-1,"0xFFFFFF") 51 | If $stashType = "Remote" Then GUICtrlSetState( -1, $GUI_CHECKED ) 52 | 53 | Local $stashPath = GUICtrlCreateInput("",409,409,560,40,-1,$WS_EX_CLIENTEDGE) 54 | GUICtrlSetState(-1,BitOr($GUI_SHOW,$GUI_ENABLE)) 55 | GUICtrlSetFont(-1,10,400,0,"Palatino Linotype") 56 | GUICtrlSetTip(-1,"Please type in the location of stash-win.exe, e.g. c:\stash\stash-win.exe") 57 | If $stashFilePath <> "" Then GUICtrlSetData( -1 , $stashFilePath ) 58 | 59 | Local $btnBrowse = GUICtrlCreateButton("Browse",982,408,131,40,-1,-1) 60 | GUICtrlSetFont(-1,10,400,0,"Tahoma") 61 | 62 | 63 | GUICtrlCreateLabel("Stash URL:",279,539,120,30,-1,-1) 64 | GUICtrlSetFont(-1,10,400,0,"Tahoma") 65 | GUICtrlSetBkColor(-1,"-2") 66 | 67 | $inputStashURL = GUICtrlCreateInput("",409,529,560,40,-1,$WS_EX_CLIENTEDGE) 68 | GUICtrlSetFont(-1,10,400,0,"Tahoma") 69 | GUICtrlSetTip(-1,"Please type in the remote URL of Stash, e.g. http://192.168.1.10:9999") 70 | if $stashURL <> "" Then GUICtrlSetData( -1, $stashURL ) 71 | 72 | ; GUICtrlCreateTabItem("") 73 | 74 | ; Tab 2 75 | GUICtrlCreateTabItem(" Choose Browser ") 76 | 77 | GUICtrlCreateLabel("Now choose your favorite browser to launch StashApp.",361,150,616,104,-1,-1) 78 | GUICtrlSetFont(-1,16,400,0,"Palatino Linotype") 79 | GUICtrlSetBkColor(-1,"-2") 80 | 81 | GUICtrlCreateGroup("Browser Choice",157,267,1014,314,-1,-1) 82 | GUICtrlSetFont(-1,12,400,0,"Palatino Linotype") 83 | GUICtrlSetBkColor(-1,"0xFFFFFF") 84 | 85 | Local $chooseFirefox = GUICtrlCreateRadio("Firefox",200,325,157,48,$BS_AUTORADIOBUTTON,-1) 86 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 87 | If $stashBrowser = "Firefox" Then GUICtrlSetState( -1, $GUI_CHECKED) 88 | 89 | Local $chooseChrome = GUICtrlCreateRadio("Chrome",200,377,157,48,$BS_AUTORADIOBUTTON,-1) 90 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 91 | If $stashBrowser = "Chrome" Then GUICtrlSetState( -1, $GUI_CHECKED) 92 | 93 | Local $chooseEdge = GUICtrlCreateRadio("MS Edge",200,430,157,48,$BS_AUTORADIOBUTTON,-1) 94 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 95 | If $stashBrowser = "MS Edge" Then GUICtrlSetState( -1, $GUI_CHECKED) 96 | 97 | Local $chooseOpera = GUICtrlCreateRadio("Opera",200,494,157,48,$BS_AUTORADIOBUTTON,-1) 98 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 99 | If $stashBrowser = "Opera" Then GUICtrlSetState( -1, $GUI_CHECKED) 100 | 101 | Local $browserDetails = GUICtrlCreateLabel("",450,339,656,163,-1,-1) 102 | GUICtrlSetFont(-1,12,400,0,"Palatino Linotype") 103 | GUICtrlSetBkColor(-1,"-2") 104 | ; The frame for the details 105 | ; GUICtrlCreateLabel("",406,270,741,235,$SS_GRAYFRAME,-1) 106 | ; GUICtrlSetBkColor(-1,"-2") 107 | 108 | ; Tab 3 109 | GUICtrlCreateTabItem(" Launch! ") 110 | 111 | GUICtrlCreateLabel("Thank you ! Now it's all ready to launch StashApp.",331,160,547,109,-1,-1) 112 | GUICtrlSetFont(-1,16,400,0,"Palatino Linotype") 113 | GUICtrlSetBkColor(-1,"-2") 114 | 115 | GUICtrlCreateLabel("Note: If this is the first time you run StashApp, it will ask you a question about where to store the config file. Since this is windows, you should choose -> 'In the current working directory.'"&@crlf&""&@crlf&"*** After you finish the wizard, you should click on 'Tasks' then 'Scan' to get your files recognized by Stash."&@crlf&"No movies? No Studio and Performers? No problem. This program will help you along the way.",201,290,895,307,-1,-1) 116 | GUICtrlSetFont(-1,12,400,0,"Palatino Linotype") 117 | GUICtrlSetBkColor(-1,"-2") 118 | 119 | ; For all tabs 120 | GUICtrlCreateTabItem("") 121 | Local $btnNext = GUICtrlCreateButton("Next",960,630,211,57,-1,-1) 122 | GUICtrlSetFont(-1,12,400,0,"Palatino Linotype") 123 | GUICtrlSetState(-1,BitOr($GUI_SHOW,$GUI_DISABLE)) 124 | 125 | ; Back to tab 0 126 | _GUICtrlTab_SetCurFocus($tab,0) 127 | 128 | ; Now set the setting if it's already there. 129 | 130 | 131 | GUISetState(@SW_SHOW, $Initial_Settings) 132 | Local $bSettingDone = False, $iSecond = @SEC 133 | Local $bPathReady = False , $bBrowserReady = False, $sBrowser = $stashBrowser 134 | While Not $bSettingDone 135 | Sleep(10) 136 | Local $nMsg = GUIGetMsg() 137 | Switch $nMsg 138 | Case $btnBrowse 139 | Local $sFile = FileOpenDialog("Open the Stash-Win.exe:", _ 140 | @DocumentsCommonDir, "(Stash-Win.exe)", $FD_FILEMUSTEXIST ) 141 | If Not @error Then 142 | GUICtrlSetData($stashPath, $sFile) 143 | EndIf 144 | Case $btnNext 145 | Switch _GUICtrlTab_GetCurFocus($tab) 146 | Case 0 ; Tab start 147 | _GUICtrlTab_SetCurFocus($tab, 1) 148 | Case 1 ; Tab Browser 149 | _GUICtrlTab_SetCurFocus($tab, 2) 150 | Case 2 ; Tab Launch 151 | If $bPathReady And $bBrowserReady Then 152 | RegWrite($gsRegBase, "StashType", "REG_SZ", $stashType) 153 | If $stashType = "Local" Then 154 | RegWrite($gsRegBase, "StashFilePath", "REG_SZ", $stashFilePath) 155 | If $stashURL = "" Then $stashURL = "http://localhost:9999/" 156 | RegWrite($gsRegBase, "StashURL", "REG_SZ", $stashURL) 157 | Else; Remote 158 | If StringRight($stashURL, 1) <> "/" Then $stashURL &= "/" 159 | RegWrite($gsRegBase, "StashURL", "REG_SZ", $stashURL) 160 | EndIf 161 | ; Set the browser choice 162 | RegWrite($gsRegBase, "Browser", "REG_SZ", $sBrowser) 163 | $bSettingDone = True 164 | 165 | ExitLoop 166 | EndIf 167 | EndSwitch 168 | 169 | Case $GUI_EVENT_CLOSE 170 | Exit 171 | EndSwitch 172 | 173 | If $iSecond <> @SEC Then 174 | $iSecond = @SEC 175 | ; Check every second. 176 | Switch _GUICtrlTab_GetCurFocus($tab) 177 | Case 0 ; Currently at Tab 0, Start 178 | ; Maybe the button now is "Launch" 179 | If GUICtrlRead($btnNext) <> "Next" Then GUICtrlSetData($btnNext, "Next") 180 | 181 | If GUICtrlRead($radioLocal) = $GUI_CHECKED Then 182 | ; Chose local 183 | $stashFilePath = GUICtrlRead($stashPath) 184 | $stashType = "Local" 185 | If StringLower(StringRight($stashFilePath, 13)) = "stash-win.exe" And FileExists($stashFilePath) Then 186 | ; the input is valid 187 | GUICtrlSetState($btnNext, $GUI_ENABLE) 188 | $bPathReady = True 189 | Else 190 | GUICtrlSetState($btnNext, $GUI_DISABLE) 191 | $bPathReady = False 192 | EndIf 193 | ElseIf GUICtrlRead($radioRemote) = $GUI_CHECKED Then 194 | ; Chose remote 195 | $stashType = "Remote" 196 | $stashURL = GUICtrlRead($inputStashURL) 197 | If stringlower(stringleft($stashURL,4)) = "http" Then 198 | ; Just the minimal check passed 199 | GUICtrlSetState($btnNext, $GUI_ENABLE) 200 | $bPathReady = True 201 | Else 202 | GUICtrlSetState($btnNext, $GUI_DISABLE) 203 | $bPathReady = False 204 | EndIf 205 | EndIf 206 | Case 1 ; Tab choose browser 207 | GUICtrlSetData($btnNext, "Next") 208 | Select 209 | Case GUICtrlRead($chooseFirefox) = $GUI_CHECKED 210 | GUICtrlSetData($browserDetails, "Seems Firefox is the best choice now. Other browsers are having problems from time to time.") 211 | $sBrowser = "Firefox" 212 | Case GUICtrlRead($chooseChrome) = $GUI_CHECKED 213 | GUICtrlSetData($browserDetails, "It works, but too many updates and different versions sometimes make the web driver crash." ) 214 | $sBrowser = "Chrome" 215 | Case GUICtrlRead($chooseEdge) = $GUI_CHECKED 216 | GUICtrlSetData($browserDetails,"It works well, but once it switched to the chrome base, it has the same problem. Plus you probably hate Microsoft so..." ) 217 | $sBrowser = "Edge" 218 | Case GUICtrlRead($chooseOpera) = $GUI_CHECKED 219 | GUICtrlSetData($browserDetails,"Never test it myself. It should work though." ) 220 | $sBrowser = "Opera" 221 | Case Else 222 | GUICtrlSetData($browserDetails, "Choose one of the browser on the left to see its note here.") 223 | $sBrowser = "" 224 | $bBrowserReady = False 225 | EndSelect 226 | If $sBrowser <> "" Then 227 | $bBrowserReady = True 228 | GUICtrlSetState($btnNext, $GUI_ENABLE) 229 | EndIf 230 | 231 | Case 2 ; Tab launch 232 | GUICtrlSetData($btnNext, "Launch !") 233 | If $bPathReady And $bBrowserReady Then 234 | GUICtrlSetState($btnNext, $GUI_ENABLE) 235 | Else 236 | GUICtrlSetState($btnNext, $GUI_DISABLE) 237 | EndIf 238 | EndSwitch 239 | EndIf 240 | Wend 241 | GUIDelete($Initial_Settings) 242 | ; Restart the program. 243 | If $iStashPID <> 0 Then 244 | If ProcessExists($iStashPID) Then ProcessClose($iStashPID) 245 | EndIf 246 | 247 | If $iConsolePID <> 0 Then 248 | ProcessClose($iConsolePID) 249 | EndIf 250 | 251 | Run( Q( @ScriptDir & "/AutoIt3.exe") & " " & Q(@ScriptDir & "\Stash_Helper.a3x" ), @ScriptDir ) 252 | Exit 253 | EndFunc 254 | -------------------------------------------------------------------------------- /source/gallery/lg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | { 8 | "fontFamily": "lg", 9 | "majorVersion": 2, 10 | "minorVersion": 0, 11 | "fontURL": "", 12 | "copyright": "", 13 | "license": "", 14 | "licenseURL": "", 15 | "description": "Font generated by IcoMoon.", 16 | "version": "Version 2.0", 17 | "fontId": "lg", 18 | "psName": "lg", 19 | "subFamily": "Regular", 20 | "fullName": "lg" 21 | } 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /source/release/gallery/lg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | { 8 | "fontFamily": "lg", 9 | "majorVersion": 2, 10 | "minorVersion": 0, 11 | "fontURL": "", 12 | "copyright": "", 13 | "license": "", 14 | "licenseURL": "", 15 | "description": "Font generated by IcoMoon.", 16 | "version": "Version 2.0", 17 | "fontId": "lg", 18 | "psName": "lg", 19 | "subFamily": "Regular", 20 | "fullName": "lg" 21 | } 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /source/wd_cdp.au3: -------------------------------------------------------------------------------- 1 | #include-once 2 | #include "wd_core.au3" 3 | #include "WinHttp_WebSocket.au3" ; https://github.com/Danp2/autoit-websocket 4 | #include 5 | 6 | #Tidy_Parameters=/tcb=-1 7 | 8 | #Region Copyright 9 | #cs 10 | * WD_CDP.au3 11 | * 12 | * MIT License 13 | * 14 | * Copyright (c) 2023 Dan Pollak 15 | * 16 | * Permission is hereby granted, free of charge, to any person obtaining a copy 17 | * of this software and associated documentation files (the "Software"), to deal 18 | * in the Software without restriction, including without limitation the rights 19 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 20 | * copies of the Software, and to permit persons to whom the Software is 21 | * furnished to do so, subject to the following conditions: 22 | * 23 | * The above copyright notice and this permission notice shall be included in all 24 | * copies or substantial portions of the Software. 25 | * 26 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 | * SOFTWARE. 33 | #ce 34 | #EndRegion Copyright 35 | 36 | ; #FUNCTION# ==================================================================================================================== 37 | ; Name ..........: _WD_CDPExecuteCommand 38 | ; Description ...: Execute CDP command. 39 | ; Syntax ........: _WD_CDPExecuteCommand($sSession, $sCommand, $oParams[, $sWebSocketURL = Default]) 40 | ; Parameters ....: $sSession - Session ID from _WD_CreateSession 41 | ; $sCommand - Name of the command 42 | ; $oParams - Parameters of the command as an object 43 | ; $sWebSocketURL - [optional] Websocket URL 44 | ; Return values .: Success - Raw return value from web driver in JSON format. 45 | ; Failure - "" (empty string) and sets @error to $_WD_ERROR_Exception 46 | ; Author ........: Damon Harris (TheDcoder) 47 | ; Modified ......: Danp2 48 | ; Remarks .......: The original version of this function is specific to ChromeDriver, you can execute "Chrome DevTools Protocol" 49 | ; commands by using this function, for all available commands see: https://chromedevtools.github.io/devtools-protocol/tot/ 50 | ; 51 | ; The revised version uses websockets to provide CDP access for all compatible browsers. However, it 52 | ; will only work with an OS that natively supports WebSockets (Windows 8, Windows Server 2012, or newer) 53 | ; Related .......: _WD_LastHTTPResult 54 | ; Link ..........: 55 | ; Example .......: No 56 | ; =============================================================================================================================== 57 | Func _WD_CDPExecuteCommand($sSession, $sCommand, $oParams, $sWebSocketURL = Default) 58 | Local Const $sFuncName = "_WD_ExecuteCDPCommand" 59 | Local $iErr = 0, $vData = Json_ObjCreate() 60 | $_WD_HTTPRESULT = 0 61 | 62 | If $sWebSocketURL = Default Then $sWebSocketURL = '' 63 | 64 | ; Original version (Chrome only) 65 | If Not $sWebSocketURL Then 66 | Json_ObjPut($vData, 'cmd', $sCommand) 67 | Json_ObjPut($vData, 'params', $oParams) 68 | $vData = Json_Encode($vData) 69 | 70 | Local $sResponse = __WD_Post($_WD_BASE_URL & ":" & $_WD_PORT & "/session/" & $sSession & '/goog/cdp/execute', $vData) 71 | $iErr = @error 72 | 73 | __WD_ConsoleWrite($sFuncName & ': ' & $sResponse, $_WD_DEBUG_Info) 74 | 75 | Return SetError(__WD_Error($sFuncName, $iErr), 0, $sResponse) 76 | EndIf 77 | 78 | ; Websocket version 79 | Local $hOpen = 0, $hConnect = 0, $hRequest = 0, $hWebSocket = 0 80 | Local $aURL, $fStatus, $sErrText, $sMessage = "" 81 | Local $iBufferLen = 1024, $tBuffer = 0, $bRecv = Binary(""), $sRecv 82 | Local $iBytesRead = 0, $iBufferType = 0 83 | Local $iStatus = 0, $iReasonLengthConsumed = 0 84 | Local $tCloseReasonBuffer = DllStructCreate("byte[123]") 85 | Local $sWSSRegex = '^((ws[s]?):\/\/)([^:\/\s]+)(?::([0-9]+))?(.*)$' 86 | Local Static $iID = 0 87 | 88 | $aURL = StringRegExp($sWebSocketURL, $sWSSRegex, 3) 89 | 90 | If Not IsArray($aURL) Or UBound($aURL) < 5 Then 91 | $iErr = $_WD_ERROR_InvalidValue 92 | $sErrText = "URL invalid" 93 | Else 94 | ; Initialize and get session handle 95 | $hOpen = _WinHttpOpen() 96 | 97 | If $_WD_WINHTTP_TIMEOUTS Then 98 | _WinHttpSetTimeouts($hOpen, $_WD_HTTPTimeOuts[0], $_WD_HTTPTimeOuts[1], $_WD_HTTPTimeOuts[2], $_WD_HTTPTimeOuts[3]) 99 | EndIf 100 | 101 | ; Get connection handle 102 | $hConnect = _WinHttpConnect($hOpen, $aURL[2], $aURL[3]) 103 | 104 | $hRequest = _WinHttpOpenRequest($hConnect, "GET", $aURL[4], "") 105 | 106 | ; Request protocol upgrade from http to websocket. 107 | $fStatus = _WinHttpSetOptionNoParams($hRequest, $WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET) 108 | 109 | If Not $fStatus Then 110 | $iErr = $_WD_ERROR_SocketError 111 | $sErrText = "SetOption error" 112 | Else 113 | ; Perform websocket handshake by sending a request and receiving server's response. 114 | ; Application may specify additional headers if needed. 115 | $fStatus = _WinHttpSendRequest($hRequest) 116 | 117 | If Not $fStatus Then 118 | $iErr = $_WD_ERROR_SocketError 119 | $sErrText = "SendRequest error" 120 | Else 121 | $fStatus = _WinHttpReceiveResponse($hRequest) 122 | 123 | If Not $fStatus Then 124 | $iErr = $_WD_ERROR_SocketError 125 | $sErrText = "ReceiveResponse error" 126 | Else 127 | ; Application should check what is the HTTP status code returned by the server and behave accordingly. 128 | ; WinHttpWebSocketCompleteUpgrade will fail if the HTTP status code is different than 101. 129 | $iStatus = _WinHttpQueryHeaders($hRequest, $WINHTTP_QUERY_STATUS_CODE) 130 | 131 | If $iStatus = $HTTP_STATUS_SWITCH_PROTOCOLS Then 132 | $hWebSocket = _WinHttpWebSocketCompleteUpgrade($hRequest, 0) 133 | 134 | If $hWebSocket = 0 Then 135 | $iErr = $_WD_ERROR_SocketError 136 | $sErrText = "WebSocketCompleteUpgrade error" 137 | EndIf 138 | Else 139 | $iErr = $_WD_ERROR_SocketError 140 | $sErrText = "ReceiveResponse Status <> $HTTP_STATUS_SWITCH_PROTOCOLS" 141 | EndIf 142 | EndIf 143 | EndIf 144 | EndIf 145 | 146 | If Not $iErr Then 147 | _WinHttpCloseHandle($hRequest) 148 | 149 | $iID += 1 150 | Json_ObjPut($vData, 'id', $iID) 151 | Json_ObjPut($vData, 'method', $sCommand) 152 | Json_ObjPut($vData, 'params', $oParams) 153 | $vData = Json_Encode($vData) 154 | 155 | ; Send and receive data on the websocket protocol. 156 | 157 | $fStatus = _WinHttpWebSocketSend($hWebSocket, _ 158 | $WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE, _ 159 | $vData) 160 | 161 | If @error Or $fStatus <> 0 Then 162 | $iErr = $_WD_ERROR_SocketError 163 | $sErrText = "WebSocketSend error" 164 | Else 165 | Do 166 | If $iBufferLen = 0 Then 167 | $iErr = $_WD_ERROR_GeneralError 168 | $sErrText = "Not enough memory" 169 | ExitLoop 170 | EndIf 171 | 172 | $tBuffer = DllStructCreate("byte[" & $iBufferLen & "]") 173 | 174 | $fStatus = _WinHttpWebSocketReceive($hWebSocket, _ 175 | $tBuffer, _ 176 | $iBytesRead, _ 177 | $iBufferType) 178 | 179 | If @error Or $fStatus <> 0 Then 180 | $iErr = $_WD_ERROR_SocketError 181 | $sErrText = "WebSocketReceive error" 182 | ExitLoop 183 | EndIf 184 | 185 | ; If we receive just part of the message restart the receive operation. 186 | $bRecv &= BinaryMid(DllStructGetData($tBuffer, 1), 1, $iBytesRead) 187 | $tBuffer = 0 188 | 189 | $iBufferLen -= $iBytesRead 190 | Until $iBufferType <> $WINHTTP_WEB_SOCKET_UTF8_FRAGMENT_BUFFER_TYPE 191 | 192 | If Not $iErr Then 193 | ; We expected server just to echo single UTF8 message. 194 | If $iBufferType <> $WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE Then 195 | $iErr = $_WD_ERROR_SocketError 196 | $sErrText = "Unexpected buffer type" 197 | EndIf 198 | 199 | $sRecv = BinaryToString($bRecv) 200 | EndIf 201 | 202 | ; Gracefully close the connection. 203 | ;~ $fStatus = _WinHttpWebSocketShutdown($hWebSocket, _ 204 | ;~ $WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS) 205 | 206 | $fStatus = _WinHttpWebSocketClose($hWebSocket, _ 207 | $WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS) 208 | 209 | If @error Or ($fStatus And $fStatus <> $ERROR_WINHTTP_CONNECTION_ERROR) Then 210 | $iErr = $_WD_ERROR_SocketError 211 | $sErrText = "WebSocketClose error (" & $fStatus & ")" 212 | Else 213 | ; Check close status returned by the server. 214 | $fStatus = _WinHttpWebSocketQueryCloseStatus($hWebSocket, _ 215 | $iStatus, _ 216 | $iReasonLengthConsumed, _ 217 | $tCloseReasonBuffer) 218 | 219 | If @error Or ($fStatus And $fStatus <> $ERROR_INVALID_OPERATION) Then 220 | $iErr = $_WD_ERROR_SocketError 221 | $sErrText = "QueryCloseStatus error (" & $fStatus & ")" 222 | EndIf 223 | EndIf 224 | EndIf 225 | EndIf 226 | EndIf 227 | 228 | If $iErr Then 229 | Return SetError(__WD_Error($sFuncName, $iErr, $sErrText), 0, "") 230 | EndIf 231 | 232 | If ($sRecv) Then 233 | If $_WD_RESPONSE_TRIM <> -1 And StringLen($sRecv) > $_WD_RESPONSE_TRIM Then 234 | $sMessage &= " ResponseText=" & StringLeft($sRecv, $_WD_RESPONSE_TRIM) & "..." 235 | Else 236 | $sMessage &= " ResponseText=" & $sRecv 237 | EndIf 238 | EndIf 239 | Return SetError(__WD_Error($sFuncName, $_WD_ERROR_Success, $sMessage), 0, $sRecv) 240 | EndFunc ;==>_WD_CDPExecuteCommand 241 | 242 | ; #FUNCTION# ==================================================================================================================== 243 | ; Name ..........: _WD_CDPGetSettings 244 | ; Description ...: Retrieve CDP related settings from the browser. 245 | ; Syntax ........: _WD_CDPGetSettings($sSession, $sOption) 246 | ; Parameters ....: $sSession - Session ID from _WD_CreateSession 247 | ; $sOption - one of the following: 248 | ; |DEBUGGER - Returns the Websocket target originally returned by _WD_CreateSession 249 | ; |LIST - Lists websocket targets 250 | ; |VERSION - Returns an array containing version metadata 251 | ; Return values .: Success - The returned value depends on the selected $sOption. 252 | ; |DEBUGGER: Websocket target originally returned by _WD_CreateSession 253 | ; |LIST: Array containing websocket targets 254 | ; |VERSION: Array containing version metadata 255 | ; Failure - "" (empty string) and sets @error to one of the following values: 256 | ; - $_WD_ERROR_Exception 257 | ; - $_WD_ERROR_GeneralError 258 | ; Author ........: Dan Pollak 259 | ; Modified ......: 260 | ; Remarks .......: 261 | ; Related .......: _WD_LastHTTPResult 262 | ; Link ..........: 263 | ; Example .......: No 264 | ; =============================================================================================================================== 265 | Func _WD_CDPGetSettings($sSession, $sOption) 266 | Local Const $sFuncName = "_WD_GetCDPSettings" 267 | Local $sJSON, $oJSON, $sDebuggerAddress, $iEntries, $aKeys, $iKeys, $aResults, $iErr 268 | Local $sKey, $vResult, $sBrowser 269 | $_WD_HTTPRESULT = 0 270 | 271 | $sJSON = _WD_GetSession($sSession) 272 | $oJSON = Json_Decode($sJSON) 273 | $sBrowser = Json_Get($oJSON, '[value][capabilities][browserName]') 274 | 275 | Switch $sBrowser 276 | Case 'firefox' 277 | $sKey = '[value][capabilities]["moz:debuggerAddress"]' 278 | 279 | Case 'chrome' 280 | $sKey = '[value][capabilities]["goog:chromeOptions"][debuggerAddress]' 281 | 282 | Case 'msedge' 283 | $sKey = '[value][capabilities]["ms:edgeOptions"][debuggerAddress]' 284 | 285 | EndSwitch 286 | 287 | $sDebuggerAddress = Json_Get($oJSON, $sKey) 288 | 289 | If @error Then 290 | $iErr = $_WD_ERROR_GeneralError 291 | Else 292 | $sOption = StringLower($sOption) 293 | 294 | Switch $sOption 295 | Case 'debugger' 296 | $vResult = $sDebuggerAddress 297 | 298 | Case 'list', 'version' 299 | $sJSON = __WD_Get("http://" & $sDebuggerAddress & "/json/" & $sOption) 300 | $iErr = @error 301 | 302 | If $iErr = $_WD_ERROR_Success Then 303 | $oJSON = Json_Decode($sJSON) 304 | $iEntries = UBound($oJSON) 305 | 306 | If $iEntries Then 307 | $aKeys = Json_ObjGetKeys($oJSON[0]) 308 | $iKeys = UBound($aKeys) 309 | 310 | Dim $aResults[$iKeys][$iEntries + 1] 311 | 312 | For $i = 0 To $iKeys - 1 313 | $aResults[$i][0] = $aKeys[$i] 314 | 315 | For $j = 0 To $iEntries - 1 316 | $sKey = "[" & $j & "]." & $aKeys[$i] 317 | $aResults[$i][$j + 1] = Json_Get($oJSON, "[" & $j & "]." & $aKeys[$i]) 318 | Next 319 | Next 320 | Else 321 | $aKeys = Json_ObjGetKeys($oJSON) 322 | $iKeys = UBound($aKeys) 323 | 324 | Dim $aResults[$iKeys][2] 325 | For $i = 0 To $iKeys - 1 326 | $aResults[$i][0] = $aKeys[$i] 327 | 328 | $aResults[$i][1] = Json_Get($oJSON, "." & $aKeys[$i]) 329 | Next 330 | EndIf 331 | 332 | $vResult = $aResults 333 | EndIf 334 | 335 | Case Else 336 | Return SetError(__WD_Error($sFuncName, $_WD_ERROR_InvalidDataType, "(Debugger|List|Version) $sCommand=>" & $sOption), 0, "") 337 | EndSwitch 338 | 339 | EndIf 340 | 341 | If $iErr Then 342 | Return SetError(__WD_Error($sFuncName, $iErr), 0, "") 343 | EndIf 344 | Return SetError(__WD_Error($sFuncName, $_WD_ERROR_Success), 0, $vResult) 345 | EndFunc ;==>_WD_CDPGetSettings 346 | -------------------------------------------------------------------------------- /source/Backup/wd_cdp.au3: -------------------------------------------------------------------------------- 1 | #include-once 2 | #include "wd_core.au3" 3 | #include "WinHttp_WebSocket.au3" ; https://github.com/Danp2/autoit-websocket 4 | #include 5 | 6 | #Tidy_Parameters=/tcb=-1 7 | 8 | #Region Copyright 9 | #cs 10 | * WD_CDP.au3 11 | * 12 | * MIT License 13 | * 14 | * Copyright (c) 2023 Dan Pollak 15 | * 16 | * Permission is hereby granted, free of charge, to any person obtaining a copy 17 | * of this software and associated documentation files (the "Software"), to deal 18 | * in the Software without restriction, including without limitation the rights 19 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 20 | * copies of the Software, and to permit persons to whom the Software is 21 | * furnished to do so, subject to the following conditions: 22 | * 23 | * The above copyright notice and this permission notice shall be included in all 24 | * copies or substantial portions of the Software. 25 | * 26 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 | * SOFTWARE. 33 | #ce 34 | #EndRegion Copyright 35 | 36 | ; #FUNCTION# ==================================================================================================================== 37 | ; Name ..........: _WD_CDPExecuteCommand 38 | ; Description ...: Execute CDP command. 39 | ; Syntax ........: _WD_CDPExecuteCommand($sSession, $sCommand, $oParams[, $sWebSocketURL = Default]) 40 | ; Parameters ....: $sSession - Session ID from _WD_CreateSession 41 | ; $sCommand - Name of the command 42 | ; $oParams - Parameters of the command as an object 43 | ; $sWebSocketURL - [optional] Websocket URL 44 | ; Return values .: Success - Raw return value from web driver in JSON format. 45 | ; Failure - "" (empty string) and sets @error to $_WD_ERROR_Exception 46 | ; Author ........: Damon Harris (TheDcoder) 47 | ; Modified ......: Danp2 48 | ; Remarks .......: The original version of this function is specific to ChromeDriver, you can execute "Chrome DevTools Protocol" 49 | ; commands by using this function, for all available commands see: https://chromedevtools.github.io/devtools-protocol/tot/ 50 | ; 51 | ; The revised version uses websockets to provide CDP access for all compatible browsers. However, it 52 | ; will only work with an OS that natively supports WebSockets (Windows 8, Windows Server 2012, or newer) 53 | ; Related .......: _WD_LastHTTPResult 54 | ; Link ..........: 55 | ; Example .......: No 56 | ; =============================================================================================================================== 57 | Func _WD_CDPExecuteCommand($sSession, $sCommand, $oParams, $sWebSocketURL = Default) 58 | Local Const $sFuncName = "_WD_ExecuteCDPCommand" 59 | Local $iErr = 0, $vData = Json_ObjCreate() 60 | $_WD_HTTPRESULT = 0 61 | 62 | If $sWebSocketURL = Default Then $sWebSocketURL = '' 63 | 64 | ; Original version (Chrome only) 65 | If Not $sWebSocketURL Then 66 | Json_ObjPut($vData, 'cmd', $sCommand) 67 | Json_ObjPut($vData, 'params', $oParams) 68 | $vData = Json_Encode($vData) 69 | 70 | Local $sResponse = __WD_Post($_WD_BASE_URL & ":" & $_WD_PORT & "/session/" & $sSession & '/goog/cdp/execute', $vData) 71 | $iErr = @error 72 | 73 | __WD_ConsoleWrite($sFuncName & ': ' & $sResponse, $_WD_DEBUG_Info) 74 | 75 | Return SetError(__WD_Error($sFuncName, $iErr), 0, $sResponse) 76 | EndIf 77 | 78 | ; Websocket version 79 | Local $hOpen = 0, $hConnect = 0, $hRequest = 0, $hWebSocket = 0 80 | Local $aURL, $fStatus, $sErrText, $sMessage = "" 81 | Local $iBufferLen = 1024, $tBuffer = 0, $bRecv = Binary(""), $sRecv 82 | Local $iBytesRead = 0, $iBufferType = 0 83 | Local $iStatus = 0, $iReasonLengthConsumed = 0 84 | Local $tCloseReasonBuffer = DllStructCreate("byte[123]") 85 | Local $sWSSRegex = '^((ws[s]?):\/\/)([^:\/\s]+)(?::([0-9]+))?(.*)$' 86 | Local Static $iID = 0 87 | 88 | $aURL = StringRegExp($sWebSocketURL, $sWSSRegex, 3) 89 | 90 | If Not IsArray($aURL) Or UBound($aURL) < 5 Then 91 | $iErr = $_WD_ERROR_InvalidValue 92 | $sErrText = "URL invalid" 93 | Else 94 | ; Initialize and get session handle 95 | $hOpen = _WinHttpOpen() 96 | 97 | If $_WD_WINHTTP_TIMEOUTS Then 98 | _WinHttpSetTimeouts($hOpen, $_WD_HTTPTimeOuts[0], $_WD_HTTPTimeOuts[1], $_WD_HTTPTimeOuts[2], $_WD_HTTPTimeOuts[3]) 99 | EndIf 100 | 101 | ; Get connection handle 102 | $hConnect = _WinHttpConnect($hOpen, $aURL[2], $aURL[3]) 103 | 104 | $hRequest = _WinHttpOpenRequest($hConnect, "GET", $aURL[4], "") 105 | 106 | ; Request protocol upgrade from http to websocket. 107 | $fStatus = _WinHttpSetOptionNoParams($hRequest, $WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET) 108 | 109 | If Not $fStatus Then 110 | $iErr = $_WD_ERROR_SocketError 111 | $sErrText = "SetOption error" 112 | Else 113 | ; Perform websocket handshake by sending a request and receiving server's response. 114 | ; Application may specify additional headers if needed. 115 | $fStatus = _WinHttpSendRequest($hRequest) 116 | 117 | If Not $fStatus Then 118 | $iErr = $_WD_ERROR_SocketError 119 | $sErrText = "SendRequest error" 120 | Else 121 | $fStatus = _WinHttpReceiveResponse($hRequest) 122 | 123 | If Not $fStatus Then 124 | $iErr = $_WD_ERROR_SocketError 125 | $sErrText = "ReceiveResponse error" 126 | Else 127 | ; Application should check what is the HTTP status code returned by the server and behave accordingly. 128 | ; WinHttpWebSocketCompleteUpgrade will fail if the HTTP status code is different than 101. 129 | $iStatus = _WinHttpQueryHeaders($hRequest, $WINHTTP_QUERY_STATUS_CODE) 130 | 131 | If $iStatus = $HTTP_STATUS_SWITCH_PROTOCOLS Then 132 | $hWebSocket = _WinHttpWebSocketCompleteUpgrade($hRequest, 0) 133 | 134 | If $hWebSocket = 0 Then 135 | $iErr = $_WD_ERROR_SocketError 136 | $sErrText = "WebSocketCompleteUpgrade error" 137 | EndIf 138 | Else 139 | $iErr = $_WD_ERROR_SocketError 140 | $sErrText = "ReceiveResponse Status <> $HTTP_STATUS_SWITCH_PROTOCOLS" 141 | EndIf 142 | EndIf 143 | EndIf 144 | EndIf 145 | 146 | If Not $iErr Then 147 | _WinHttpCloseHandle($hRequest) 148 | 149 | $iID += 1 150 | Json_ObjPut($vData, 'id', $iID) 151 | Json_ObjPut($vData, 'method', $sCommand) 152 | Json_ObjPut($vData, 'params', $oParams) 153 | $vData = Json_Encode($vData) 154 | 155 | ; Send and receive data on the websocket protocol. 156 | 157 | $fStatus = _WinHttpWebSocketSend($hWebSocket, _ 158 | $WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE, _ 159 | $vData) 160 | 161 | If @error Or $fStatus <> 0 Then 162 | $iErr = $_WD_ERROR_SocketError 163 | $sErrText = "WebSocketSend error" 164 | Else 165 | Do 166 | If $iBufferLen = 0 Then 167 | $iErr = $_WD_ERROR_GeneralError 168 | $sErrText = "Not enough memory" 169 | ExitLoop 170 | EndIf 171 | 172 | $tBuffer = DllStructCreate("byte[" & $iBufferLen & "]") 173 | 174 | $fStatus = _WinHttpWebSocketReceive($hWebSocket, _ 175 | $tBuffer, _ 176 | $iBytesRead, _ 177 | $iBufferType) 178 | 179 | If @error Or $fStatus <> 0 Then 180 | $iErr = $_WD_ERROR_SocketError 181 | $sErrText = "WebSocketReceive error" 182 | ExitLoop 183 | EndIf 184 | 185 | ; If we receive just part of the message restart the receive operation. 186 | $bRecv &= BinaryMid(DllStructGetData($tBuffer, 1), 1, $iBytesRead) 187 | $tBuffer = 0 188 | 189 | $iBufferLen -= $iBytesRead 190 | Until $iBufferType <> $WINHTTP_WEB_SOCKET_UTF8_FRAGMENT_BUFFER_TYPE 191 | 192 | If Not $iErr Then 193 | ; We expected server just to echo single UTF8 message. 194 | If $iBufferType <> $WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE Then 195 | $iErr = $_WD_ERROR_SocketError 196 | $sErrText = "Unexpected buffer type" 197 | EndIf 198 | 199 | $sRecv = BinaryToString($bRecv) 200 | EndIf 201 | 202 | ; Gracefully close the connection. 203 | ;~ $fStatus = _WinHttpWebSocketShutdown($hWebSocket, _ 204 | ;~ $WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS) 205 | 206 | $fStatus = _WinHttpWebSocketClose($hWebSocket, _ 207 | $WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS) 208 | 209 | If @error Or ($fStatus And $fStatus <> $ERROR_WINHTTP_CONNECTION_ERROR) Then 210 | $iErr = $_WD_ERROR_SocketError 211 | $sErrText = "WebSocketClose error (" & $fStatus & ")" 212 | Else 213 | ; Check close status returned by the server. 214 | $fStatus = _WinHttpWebSocketQueryCloseStatus($hWebSocket, _ 215 | $iStatus, _ 216 | $iReasonLengthConsumed, _ 217 | $tCloseReasonBuffer) 218 | 219 | If @error Or ($fStatus And $fStatus <> $ERROR_INVALID_OPERATION) Then 220 | $iErr = $_WD_ERROR_SocketError 221 | $sErrText = "QueryCloseStatus error (" & $fStatus & ")" 222 | EndIf 223 | EndIf 224 | EndIf 225 | EndIf 226 | EndIf 227 | 228 | If $iErr Then 229 | Return SetError(__WD_Error($sFuncName, $iErr, $sErrText), 0, "") 230 | EndIf 231 | 232 | If ($sRecv) Then 233 | If $_WD_RESPONSE_TRIM <> -1 And StringLen($sRecv) > $_WD_RESPONSE_TRIM Then 234 | $sMessage &= " ResponseText=" & StringLeft($sRecv, $_WD_RESPONSE_TRIM) & "..." 235 | Else 236 | $sMessage &= " ResponseText=" & $sRecv 237 | EndIf 238 | EndIf 239 | Return SetError(__WD_Error($sFuncName, $_WD_ERROR_Success, $sMessage), 0, $sRecv) 240 | EndFunc ;==>_WD_CDPExecuteCommand 241 | 242 | ; #FUNCTION# ==================================================================================================================== 243 | ; Name ..........: _WD_CDPGetSettings 244 | ; Description ...: Retrieve CDP related settings from the browser. 245 | ; Syntax ........: _WD_CDPGetSettings($sSession, $sOption) 246 | ; Parameters ....: $sSession - Session ID from _WD_CreateSession 247 | ; $sOption - one of the following: 248 | ; |DEBUGGER - Returns the Websocket target originally returned by _WD_CreateSession 249 | ; |LIST - Lists websocket targets 250 | ; |VERSION - Returns an array containing version metadata 251 | ; Return values .: Success - The returned value depends on the selected $sOption. 252 | ; |DEBUGGER: Websocket target originally returned by _WD_CreateSession 253 | ; |LIST: Array containing websocket targets 254 | ; |VERSION: Array containing version metadata 255 | ; Failure - "" (empty string) and sets @error to one of the following values: 256 | ; - $_WD_ERROR_Exception 257 | ; - $_WD_ERROR_GeneralError 258 | ; Author ........: Dan Pollak 259 | ; Modified ......: 260 | ; Remarks .......: 261 | ; Related .......: _WD_LastHTTPResult 262 | ; Link ..........: 263 | ; Example .......: No 264 | ; =============================================================================================================================== 265 | Func _WD_CDPGetSettings($sSession, $sOption) 266 | Local Const $sFuncName = "_WD_GetCDPSettings" 267 | Local $sJSON, $oJSON, $sDebuggerAddress, $iEntries, $aKeys, $iKeys, $aResults, $iErr 268 | Local $sKey, $vResult, $sBrowser 269 | $_WD_HTTPRESULT = 0 270 | 271 | $sJSON = _WD_GetSession($sSession) 272 | $oJSON = Json_Decode($sJSON) 273 | $sBrowser = Json_Get($oJSON, '[value][capabilities][browserName]') 274 | 275 | Switch $sBrowser 276 | Case 'firefox' 277 | $sKey = '[value][capabilities]["moz:debuggerAddress"]' 278 | 279 | Case 'chrome' 280 | $sKey = '[value][capabilities]["goog:chromeOptions"][debuggerAddress]' 281 | 282 | Case 'msedge' 283 | $sKey = '[value][capabilities]["ms:edgeOptions"][debuggerAddress]' 284 | 285 | EndSwitch 286 | 287 | $sDebuggerAddress = Json_Get($oJSON, $sKey) 288 | 289 | If @error Then 290 | $iErr = $_WD_ERROR_GeneralError 291 | Else 292 | $sOption = StringLower($sOption) 293 | 294 | Switch $sOption 295 | Case 'debugger' 296 | $vResult = $sDebuggerAddress 297 | 298 | Case 'list', 'version' 299 | $sJSON = __WD_Get("http://" & $sDebuggerAddress & "/json/" & $sOption) 300 | $iErr = @error 301 | 302 | If $iErr = $_WD_ERROR_Success Then 303 | $oJSON = Json_Decode($sJSON) 304 | $iEntries = UBound($oJSON) 305 | 306 | If $iEntries Then 307 | $aKeys = Json_ObjGetKeys($oJSON[0]) 308 | $iKeys = UBound($aKeys) 309 | 310 | Dim $aResults[$iKeys][$iEntries + 1] 311 | 312 | For $i = 0 To $iKeys - 1 313 | $aResults[$i][0] = $aKeys[$i] 314 | 315 | For $j = 0 To $iEntries - 1 316 | $sKey = "[" & $j & "]." & $aKeys[$i] 317 | $aResults[$i][$j + 1] = Json_Get($oJSON, "[" & $j & "]." & $aKeys[$i]) 318 | Next 319 | Next 320 | Else 321 | $aKeys = Json_ObjGetKeys($oJSON) 322 | $iKeys = UBound($aKeys) 323 | 324 | Dim $aResults[$iKeys][2] 325 | For $i = 0 To $iKeys - 1 326 | $aResults[$i][0] = $aKeys[$i] 327 | 328 | $aResults[$i][1] = Json_Get($oJSON, "." & $aKeys[$i]) 329 | Next 330 | EndIf 331 | 332 | $vResult = $aResults 333 | EndIf 334 | 335 | Case Else 336 | Return SetError(__WD_Error($sFuncName, $_WD_ERROR_InvalidDataType, "(Debugger|List|Version) $sCommand=>" & $sOption), 0, "") 337 | EndSwitch 338 | 339 | EndIf 340 | 341 | If $iErr Then 342 | Return SetError(__WD_Error($sFuncName, $iErr), 0, "") 343 | EndIf 344 | Return SetError(__WD_Error($sFuncName, $_WD_ERROR_Success), 0, $vResult) 345 | EndFunc ;==>_WD_CDPGetSettings 346 | -------------------------------------------------------------------------------- /source/Forms/SceneToMovieForm.au3: -------------------------------------------------------------------------------- 1 | Func Scene2Movie() 2 | Global $mInfo 3 | ; First to switch to the scene tab. * Disabled, no need to switch 4 | ; SwitchToTab("scenes") 5 | ; If @error Then Return SetError(1) 6 | Local $sURL = _WD_Action($sSession, "url") 7 | Local $nScene = GetNumber($sURL, "scenes") 8 | If @error Then Return SetError(2) 9 | ; Get Scene info will set the global $mInfo 10 | GetSceneInfo($nScene) 11 | If @error Then Return SetError(3) 12 | 13 | ; Now show a GUI and ask which info to copy over. 14 | Global $guiScene2Movie = GUICreate("Copy Scene Info To Movie",766,968,-1,-1,$WS_SIZEBOX,-1) 15 | GUICtrlCreateLabel("Please choose the information you like to transfer to the movie.",80,19,698,80,-1,-1) 16 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 17 | GUICtrlSetBkColor(-1,"-2") 18 | GUICtrlSetResizing(-1,550) 19 | Global $lvValues = GUICtrlCreatelistview("#|Properties|Value",32,110,703,282,$LVS_SINGLESEL,BitOr($LVS_EX_FULLROWSELECT,$LVS_EX_CHECKBOXES,$WS_EX_STATICEDGE)) 20 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 21 | GUICtrlSetResizing(-1,550) 22 | _GUICtrlListView_SetColumnWidth($lvValues, 0, 40) 23 | _GUICtrlListView_SetColumnWidth($lvValues, 1, 200) 24 | _GUICtrlListView_SetColumnWidth($lvValues, 2, 450) 25 | GUICtrlCreateListViewItem("1|Title|" & $mInfo.Item("Title"), $lvValues) ;0 26 | GUICtrlCreateListViewItem("1|URL|" & $mInfo.Item("URL"), $lvValues) ;1 27 | GUICtrlCreateListViewItem("1|Date|" & $mInfo.Item("Date"), $lvValues) ;2 28 | GUICtrlCreateListViewItem("1|Duration|" & TimeConvert($mInfo.Item("Duration")), $lvValues) ;3 29 | GUICtrlCreateListViewItem("1|Details|" & $mInfo.Item("Details"), $lvValues) ;4 30 | GUICtrlCreateListViewItem("1|Studio|" & $mInfo.Item("StudioName"), $lvValues);5 31 | For $i = 0 To 5 32 | ; Make all the item checked 33 | _GUICtrlListView_SetItemChecked($lvValues, $i) 34 | Next 35 | Local $btnOK = GUICtrlCreateButton("OK",548,448,184,54,-1,-1) 36 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 37 | GUICtrlSetResizing(-1,804) 38 | 39 | Local $btnCancel = GUICtrlCreateButton("Cancel",548,516,184,54,-1,-1) 40 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 41 | GUICtrlSetResizing(-1,804) 42 | 43 | local $btnBatchCreateStudio = GUICtrlCreateButton("Create movies for scenes in same Studio",100,780,555,51,-1,-1) 44 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 45 | GUICtrlSetTip(-1,"Create movies for all other scenes in the same studio that don't link to a movie yet.") 46 | GUICtrlSetResizing(-1,836) 47 | 48 | 49 | Local $btnBatchCreate = GUICtrlCreateButton("Create movies for all other scenes",100,846,555,51,-1,-1) 50 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 51 | GUICtrlSetTip(-1,"Create movies for all other scenes which have no movies yet. Following the checked items here.") 52 | GUICtrlSetResizing(-1,836) 53 | 54 | ; Download the image to temp folder. 55 | Local $sExt = StringMid($mInfo.Item("ScreenShot"), stringinstr($mInfo.Item("ScreenShot"), ".", 2, -1)) 56 | Local $sTempPicFile = @TempDir & "\temp" & $sExt 57 | InetGet($mInfo.Item("ScreenShot"), $sTempPicFile) 58 | Local $imgCover = GUICtrlCreatePic($sTempPicFile,29,448,455,314,-1,$WS_EX_STATICEDGE) 59 | GUICtrlSetResizing(-1,102) 60 | 61 | Local $chkCover = GUICtrlCreateCheckbox("Cover",39,405,150,33,-1,-1) 62 | GUICtrlSetState($chkCover, $GUI_CHECKED) 63 | GUICtrlSetFont(-1,12,400,0,"Tahoma") 64 | GUICtrlSetResizing(-1,802) 65 | 66 | ; Disable the tray clicks 67 | TraySetClick(0) 68 | 69 | GUISetState(@SW_SHOW, $guiScene2Movie) 70 | While True 71 | ; if click on tray icon, activate the current GUI 72 | Local $nTrayMsg = TrayGetMsg() 73 | Switch $nTrayMsg 74 | Case $TRAY_EVENT_PRIMARYDOWN, $TRAY_EVENT_SECONDARYDOWN 75 | WinActivate($guiScene2Movie) 76 | EndSwitch 77 | 78 | Local $nMsg = GUIGetMsg() 79 | Switch $nMsg 80 | Case $btnOK 81 | CreateSingleMovie($lvValues, $chkCover) 82 | RefreshAllTabs() 83 | ExitLoop 84 | Case $btnBatchCreate 85 | BatchCreate($lvValues, $chkCover) 86 | RefreshAllTabs() 87 | ExitLoop 88 | Case $btnBatchCreateStudio 89 | If $mInfo.Item("StudioID") = Null Then 90 | MsgBox(0, "No Studio", "This scene doesn't have a studio.") 91 | ContinueLoop 92 | EndIf 93 | ; Add aditional filter. 94 | BatchCreate($lvValues, $chkCover, ",studios:{value:"& $mInfo.Item("StudioID") & ", modifier:INCLUDES}") 95 | RefreshAllTabs() 96 | ExitLoop 97 | Case $GUI_EVENT_RESIZED 98 | GUICtrlSetImage($imgCover, $sTempPicFile) 99 | Case $GUI_EVENT_CLOSE, $btnCancel 100 | ExitLoop 101 | EndSwitch 102 | Wend 103 | GUIDelete($guiScene2Movie) 104 | ; restore the tray icon functions. 105 | TraySetClick(9) 106 | EndFunc 107 | 108 | Func BatchCreate($lvValues, $chkCover, $sFilter = "") 109 | ; Global $mInfo, it should be a dictionary object 110 | 111 | Local $reply = MsgBox(262449,"Warning.","This function will create one movie for every scene that's not linked to a movie yet." _ 112 | & @CRLF & "Also it will follow the check boxes here to only retrieve the information you specified." _ 113 | & @CRLF & "However, it might create a lot of movies in the process. The problem is more serious when you have multiple scenes meant for the same movie." _ 114 | & @CRLF & "So are you sure you want to continue?",0) 115 | If $reply = 2 Then Return 116 | 117 | Local $bGetTitle = _GUICtrlListView_GetItemChecked($lvValues, 0) 118 | Local $bGetUrl = _GUICtrlListView_GetItemChecked($lvValues, 1) 119 | Local $bGetDate = _GUICtrlListView_GetItemChecked($lvValues, 2) 120 | Local $bGetDuration = _GUICtrlListView_GetItemChecked($lvValues, 3) 121 | Local $bGetDetails = _GUICtrlListView_GetItemChecked($lvValues, 4) 122 | Local $bGetStudio = _GUICtrlListView_GetItemChecked($lvValues, 5) 123 | Local $bGetCover = (GUICtrlRead($chkCover) = $GUI_CHECKED ) 124 | 125 | If Not $bGetTitle Then 126 | ; Title was not check, exit 127 | MsgBox(48,"Must have title checked.","The check box next to 'Title' must be checked, because in this batch mode, title is mandatory.",0) 128 | Return 129 | EndIf 130 | 131 | ; Now get the list of all scenes without a movie 132 | local $sQuery = '{ "query": "{findScenes(scene_filter:{is_missing: \"movie\"' _ 133 | & $sFilter & '}filter:{per_page:-1}){count,scenes{id}}}" }' 134 | Local $sResult = Query($sQuery) 135 | If @error Then Return SetError(1) 136 | 137 | Local $oResult = Json_Decode($sResult) 138 | If Not IsObj($oResult) Then 139 | MsgBox(0, "Error decoding result", "Error getting result:" & $sResult) 140 | Return SetError(1) 141 | EndIf 142 | Local $oData = Json_ObjGet($oResult, "data.findScenes") 143 | Local $iCount = $oData.Item("count") 144 | 145 | If $iCount = "" Or $iCount = 0 Then 146 | MsgBox(0, "No scenes", "There is no scenes to create movies.") 147 | Return 148 | EndIf 149 | Local $aScenes = Json_ObjGet($oData, "scenes") 150 | If @error Then 151 | MsgBox(0, "error decoding", "Error in decoding data from the query") 152 | Return SetError(1) 153 | EndIf 154 | 155 | $iCount = UBound($aScenes) ; For some reason, the previous iCount has serious problem 156 | Local $aIDs[$iCount] ; Create an array for ids 157 | 158 | For $i = 0 To $iCount-1 159 | ; get the string IDs 160 | $aIDs[$i] = $aScenes[$i].Item("id") 161 | Next 162 | 163 | ; Batch create movies 164 | 165 | ; Set mouse cursor to wait. 166 | Local $old_cursor = MouseGetCursor() 167 | GUISetCursor(15, 1, $guiScene2Movie) 168 | 169 | Local $iMovieCreated = 0 170 | For $i = 0 to $iCount-1 171 | ; Set the scene info in $mInfo 172 | GetSceneInfo($aIDs[$i]) 173 | If Not $bGetURL Then $mInfo.Item("Url") = Null 174 | If Not $bGetDate Then $mInfo.Item("Date") = Null 175 | If Not $bGetDuration Then $mInfo.Item("Duration") = Null 176 | If Not $bGetDetails Then $mInfo.Item("Details") = Null 177 | If Not $bGetStudio Then $mInfo.Item("StudioID") = Null 178 | If Not $bGetCover Then $mInfo.Item("ScreenShot") = Null 179 | ; Now the info is ready. 180 | $sQuery = '{"query": "mutation{ movieCreate(input:{name: \"' & $mInfo.Item("Title") & '\",' & _ 181 | ($mInfo.Item("Date") = Null ? "" : 'date: \"' & $mInfo.Item("Date") & '\",' ) & _ 182 | ($mInfo.Item("Details") = Null ? "" : 'synopsis: \"'& $mInfo.Item("Details") & '\",' ) & _ 183 | ($mInfo.Item("URL") = Null ? "" : 'url: \"' & $mInfo.Item("URL") & '\",' ) & _ 184 | ($mInfo.Item("StudioID") = Null ? "" : 'studio_id:' & $mInfo.Item("StudioID") & ',' )& _ 185 | ($mInfo.Item("ScreenShot") = Null ? "" : 'front_image:\"' & $mInfo.Item("ScreenShot") & '\",' )& _ 186 | ($mInfo.Item("Duration") = 0 ? "" : 'duration: ' & $mInfo.Item("Duration") ) & _ 187 | '}){id} }"}' 188 | 189 | ; OK, now create a new movie base on the above. 190 | $sResult = Query($sQuery) 191 | If @error Then ExitLoop 192 | 193 | $oResult = Json_Decode($sResult) 194 | If Not IsObj($oResult) Then 195 | MsgBox(0, "Error decoding result", "Error getting result:" & $sResult) 196 | Return SetError(1) 197 | EndIf 198 | $mInfo.Item("MovieID") = Json_ObjGet($oResult, "data.movieCreate.id") 199 | ; c ( "ID:" & $sMovieID) 200 | 201 | ; Now update the scene 202 | $sQuery = '{"query":"mutation{sceneUpdate(input:{id:' & $mInfo.Item("SceneID") & ',movies:{movie_id:' _ 203 | & $mInfo.Item("MovieID") & '}}){id}}"}' 204 | $sResult = Query($sQuery) 205 | If @error Then ExitLoop 206 | 207 | $iMovieCreated += 1 208 | Next 209 | 210 | ; Set cursor back. 211 | GUISetCursor($old_cursor, 1, $guiScene2Movie) 212 | 213 | _WD_Action($sSession, 'refresh') 214 | MsgBox(0, "Job Done", "Total movie created: " & $iMovieCreated) 215 | 216 | EndFunc 217 | 218 | 219 | Func CreateSingleMovie($lvValues, $chkCover) 220 | ; Global $mInfo 221 | Local $bGetTitle = _GUICtrlListView_GetItemChecked($lvValues, 0) 222 | Local $bGetUrl = _GUICtrlListView_GetItemChecked($lvValues, 1) 223 | Local $bGetDate = _GUICtrlListView_GetItemChecked($lvValues, 2) 224 | local $bGetDuration = _GUICtrlListView_GetItemChecked($lvValues, 3) 225 | Local $bGetDetails = _GUICtrlListView_GetItemChecked($lvValues, 4) 226 | Local $bGetStudio = _GUICtrlListView_GetItemChecked($lvValues, 5) 227 | ConsoleWrite("check state:" & GUICtrlGetState($chkCover)) 228 | Local $bGetCover = ( GUICtrlRead($chkCover) = $GUI_CHECKED ) 229 | ; c("get cover?" & $bGetCover) 230 | Local $input = "", $sTitle = $bGetTitle ? $mInfo.Item("Title") : "" 231 | If $sTitle = "" Then 232 | ; Title is empty, get the title from user. 233 | $sTitle = $mInfo.Item("BaseName") ; Get the filename as suggested title. 234 | While $input = "" 235 | $input = InputBox("Must have a name", "The movie must have a title.", $sTitle ) 236 | if @error = 1 Then Return SetError(1) ; Cancelled. 237 | WEnd 238 | $mInfo.Item("Title") = $input 239 | EndIf 240 | 241 | If Not $bGetURL Then $mInfo.Item("Url") = Null 242 | If Not $bGetDate Then $mInfo.Item("Date") = Null 243 | If Not $bGetDuration Then $mInfo.Item("Duration") = Null 244 | If Not $bGetDetails Then $mInfo.Item("Details") = Null 245 | If Not $bGetStudio Then $mInfo.Item("StudioID") = Null 246 | If Not $bGetCover Then $mInfo.Item("ScreenShot") = Null 247 | ; c ("ScreenShot:" & $mInfo.Item("ScreenShot") ) 248 | 249 | ; Now the info is ready. 250 | Local $sQuery = '{"query": "mutation{ movieCreate(input:{name: \"' & _JsonStringEscape( $mInfo.Item("Title") ) & '\",' & _ 251 | ($mInfo.Item("Date") = Null ? "" : 'date: \"' & $mInfo.Item("Date") & '\",' ) & _ 252 | ($mInfo.Item("Details") = Null ? "" : 'synopsis: \"'& _JsonStringEscape( $mInfo.Item("Details") ) & '\",' ) & _ 253 | ($mInfo.Item("URL") = Null ? "" : 'url: \"' & $mInfo.Item("URL") & '\",' ) & _ 254 | ($mInfo.Item("StudioID") = Null ? "" : 'studio_id:' & $mInfo.Item("StudioID") & ',' )& _ 255 | ($mInfo.Item("ScreenShot") = Null ? "" : 'front_image:\"' & $mInfo.Item("ScreenShot") & '\",' )& _ 256 | ($mInfo.Item("Duration") = 0 ? "" : 'duration: ' & $mInfo.Item("Duration") ) & _ 257 | '}){id} }"}' 258 | 259 | ; ClipPut( $sQuery) 260 | ; c( "movie query in the clipboard.") 261 | 262 | ; OK, now create a new movie base on the above. 263 | Local $sResult = Query($sQuery) 264 | If @error Then Return SetError(1) 265 | 266 | Local $oResult = Json_Decode($sResult) 267 | If Not IsObj($oResult) Then 268 | MsgBox(0, "Error decoding result", "Error getting result:" & $sResult) 269 | Return SetError(1) 270 | EndIf 271 | $mInfo.Item("MovieID") = Json_ObjGet($oResult, "data.movieCreate.id") 272 | ; c ( "ID:" & $sMovieID) 273 | 274 | ; Now update the scene 275 | $sQuery = '{"query":"mutation{sceneUpdate(input:{id:' & $mInfo.Item("SceneID") & ',movies:{movie_id:' & $mInfo.Item("MovieID") & '}}){id}}"}' 276 | $sResult = Query($sQuery) 277 | If @error Then Return SetError(1) 278 | 279 | _WD_Action($sSession, 'refresh') 280 | Sleep(1000) 281 | OpenURL($stashURL & "movies/" & $mInfo.Item("MovieID") ) 282 | ; Sleep(2000) 283 | ; Alert("Movie created.") 284 | 285 | EndFunc 286 | 287 | 288 | Func GetSceneInfo($nSceneNo) 289 | Global $mInfo 290 | ; clear out the dictionary object 291 | $mInfo.RemoveAll 292 | 293 | Local $sQuery = '{"query": "{findScene(id:' & $nSceneNo & '){title,details,urls,date,paths{screenshot},files{basename,duration},studio{id,name}}}" }' 294 | Local $sResult = Query($sQuery) 295 | If @error Then Return SetError(1) 296 | 297 | ; Got the result 298 | Local $oResult = Json_Decode($sResult) 299 | If Not IsObj($oResult) Then 300 | MsgBox(0, "Error decoding result", "Error getting result:" & $sResult) 301 | Return SetError(1) 302 | EndIf 303 | If not IsObj($oResult) Then Return SetError(2) 304 | Local $oData = Json_ObjGet($oResult, "data.findScene") 305 | If @error Then Return SetError(1) 306 | $mInfo.Add("SceneID", $nSceneNo) 307 | $mInfo.Add("Title", $oData.Item("title") ) 308 | $mInfo.Add("Details", $oData.Item("details") ) 309 | Local $aURL = $oData.Item("urls") 310 | $mInfo.Add("URL", UBound($aURL)=0 ? "": $aURL[0] ); Since movie has only one URL, use the first one, or empty 311 | $mInfo.Add("Date", $oData.Item("date") ) 312 | Local $aFiles = $oData.Item("files") 313 | $mInfo.Add("BaseName", UBound($aFiles) = 0 ? "" : $aFiles[0].Item("basename") ) 314 | $mInfo.Add("Duration", UBound($aFiles) = 0 ? 0 : Floor($aFiles[0].Item("duration") ) ) ; duration in seconds. 315 | ; Special handling with studio 316 | If $oData.Item("studio") = Null Then 317 | $mInfo.Add("StudioID", Null) 318 | $mInfo.Add("StudioName", Null) 319 | Else 320 | $mInfo.Add("StudioID", $oData.Item("studio").Item("id") ) 321 | $mInfo.Add("StudioName", $oData.Item("studio").Item("name") ) 322 | EndIf 323 | $mInfo.Add("ScreenShot", $oData.Item("paths").Item("screenshot") ) 324 | 325 | EndFunc 326 | --------------------------------------------------------------------------------