Jump to content

carlvanwormer

Active Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by carlvanwormer

  1. I updated the log file and added a system reboot at 1am each morning. The original system would reboot if VLC crashed, but I was still getting an occasional system problem (touchscreen going black even though the system had constant power and was set to never blank the screen or go to sleep). I added a reboot at 1am (with notes left in the log file) to try to catch any remaining hardware and software problems. BigPause-206-m3u.au3
  2. I have my "final" version! (yes, I know what a joke that is . . .) It works and my dad can Play-Paus easily with the giant button filling most of the 10.1" display on his tablet. Here is the current AutoIt version for your viewing pleasure. I cannot express enough thanks to CYCho for doing most of the hard work on this project. My 96-year-old dad is now "self sufficient" with his Monk habit (60GB 8-season series on the Tablet) and only 2 buttons to press (the one on the tablet and a mechanical giant power button on a modified TV remote control. Thanks, Carl BigPause-118-m3u.au3
  3. Things are going well. I thought changing the color of the button to red for Pause and (when paused) Green for play. Unfortunately, this is just a toggle and it can get out of sync. I will be looking into the VNC commands to see if I can query the paus/play state to resolve my problem. Otherwise, I'll go back to the single color. Later, Carl
  4. You did it! I got **PID obtained after 1 seconds = 9324 **Waiting for VLC to produce window handle... **Window handle obtained after 4755.6825 milliseconds = 0x00010900 for the first run, then **PID obtained after 1 seconds = 876 **Waiting for VLC to produce window handle... **Window handle obtained after 0.6338 milliseconds = 0x00020944 it looks like my old windows machine needs to knock stuff around for the first time it tries something. I'll add a little polish to my code while waiting for the tablet to arrive. When I like it, should I upload it here in case anybody else wants the world's dumbest controller? Thanks, Carl
  5. That was it for not stopping the video player. My code in that area now reads: Global $pid, $seconds While 1 ConsoleWrite (" 1 pid = " & $pid ) $pid = Run($vlcPath & " " & @ScriptDir & "\VLC-Playlist.m3u") ConsoleWrite (" 2 pid = " & $pid ) $seconds += 1 Sleep($seconds * 1000) If $pid <> "" Then ConsoleWrite (" 3 pid = " & $pid ) ;MsgBox(0, "", "It took " & $seconds & " seconds to run VLC.exe", 0, $vcGUI) ConsoleWrite ( " exiting pid loop ") ExitLoop EndIf If $seconds > 10 Then ConsoleWrite (" timeout exit " & $seconds ) Exit MsgBox(0, "", "VLC.exe could not be run.") EndIf WEnd $hWnd = WinGetHandle("[CLASS:Qt5QWindowIcon]", "VLC") ; Please check if your VLC window class matches with this ConsoleWrite (" after read of $hWnd = " & $hWnd ) I'm still having problems with the initial run after reboot. The results of the ConsoleWrites for the first boot are: 1 pid = 2 pid = 14236 3 pid = 14236 exiting pid loop after read of $hWnd = 0x00000000 And after running again: 1 pid = 2 pid = 14704 3 pid = 14704 exiting pid loop after read of $hWnd = 0x0006087E Can you tell me how to check the VLC window class? With that, I can probably proceed to the next step of debugging. Thanks, Carl
  6. I added your code above the old run($vlcPath . . .) code. It reported 1 second (first run after a reboot). The Paus/Play button worked. The exit button quit the program, but didn't stop the video from playing. My debug counter was still in the code, giving "Counting - 1 0x00000000 Counting - 2 0x00000000 Counting - 3 0x00010818 exiting with MyExit $hWnd = 0x00010818 " It appears that the $hWnd is the problem area. I need to take off now, but if you have any other debugging techniques better than my crude stuff, I can try it tomorrow. Thanks, Carl
  7. I found an interesting quirk, but it is something I can get around. After a computer reboot (current win-10 system) I can run the script, but it always exits. If I manually run VLC and then exit vlc before running the script I get the expected script behavior. In tracing the reason, I was following the mainloop code and found that the code was taking the exit the first time through the loop because of the "if not winexists($hwnd) at the end of the loop. I added a loop at the definition of $hWnd: Run($vlcPath & " " & @ScriptDir & "\VLC-Playlist.m3u") for $x=1 to 10 Sleep(1000) $hWnd = WinGetHandle("[CLASS:Qt5QWindowIcon]", "VLC") ; Please check if your VLC window class matches with this ConsoleWrite (" Counting - " & $x & " " & $hWnd ) if $hWnd <> 0x00000000 then ExitLoop Next first run after reboot I got: Counting - 1 0x00000000 Counting - 2 0x00000000 Counting - 3 0x00000000 Counting - 4 0x00000000 Counting - 5 0x00000000 Counting - 6 0x00000000 Counting - 7 0x00000000 Counting - 8 0x00000000 Counting - 9 0x00000000 Counting - 10 0x00000000 and the script exited. After the second run, I got: Counting - 1 0x0001098C and the scrip ran perfectly. I see your comment about checking my vlc window class, and the summary of that window info is: >>>> Window <<<< Title: 8x01 La serie favorita del Sr. Monk - VLC media player Class: Qt5QWindowIcon Position: 203, 58 Size: 1137, 741 Style: 0x96CF0000 ExStyle: 0x00000100 Handle: 0x0000000000020970 >>>> Control <<<< Class: VLC video output 000001EA20BE85D0 Instance: 1 ClassnameNN: VLC video output 000001EA20BE85D01 Name: Advanced (Class): [CLASS:VLC video output 000001EA20BE85D0; INSTANCE:1] ID: Text: Position: 1, 21 Size: 1118, 629 ControlClick Coords: 589, 142 Style: 0x50000000 ExStyle: 0x00000000 Handle: 0x0000000000040926 >>>> Visible Text <<<< QWidgetClassWindow ControlsWidgetClassWindow InputControlsWidgetClassWindow QStackedWidgetClassWindow VideoWidgetClassWindow QWidgetClassWindow VLC (Direct3D11 output) QMenuBarClassWindow >>>> Hidden Text <<<< QStatusBarClassWindow BackgroundWidgetClassWindow QWidgetClassWindow There is something going on here, but I don't know enough to fix it. thanks, Carl
  8. WOW! That worked as expected. I was going to upload my latest failure that "almost worked" (except I didn't know how to correctly parse the VLC file), but your working file was waiting for me. I'll pound on it tomorrow to see if I can break anything else, and then I'll probably be able to run it on the tablet on Tuesday. I really appreciate the time you've invested in helping me. Contact me if you ever need any electronics troubleshooting help. Thanks, Carl
  9. I added some variables for defining the button sizes and locations to allow for quick modification when my tablet arrives next week. Things seem to be working well with VLC player mods you made. I found that I could manually run VLC from its install folder, selecting the language and captioning channels and they would stick for subsequent defaults. I've attached my updated code for your viewing pleasure. As I was working out the details, I found that the "file location memory" capability of the original program was no longer available. The zPlayer.ini file is not referenced in the new code version. I've spent some time trying to hack that function into the new code from the old system, but I've been unsuccessful. Do you have any suggestions as to the minimum "necessary and sufficient" items from the old code that need to be added to allow the program to restart where it left off from the previous run? Thanks, Carl BigPause-10.au3
  10. I found that I could make it work if I changed my folder structure to remove spaces. I set out to "fix" the problem by changing the line: $fh = FileOpen(@ScriptDir & "\VLC-Playlist.xspf", 2) to $newstring = '"' & @ScriptDir & "\VLC-Playlist.xspf" & '"' $fh = FileOpen($newstring, 2) ConsoleWrite (" $newstring is " ) ConsoleWrite ($newstring) ConsoleWrite (" $newstring" ) when I run this code I still get the same error results, and the console window shows the quoted string as sent to the system: $newstring is "C:\Users\Carl\Documents\AutoIt\Monk Season 1\VLC-Playlist.xspf" $newstring When I copy this quoted string to the windows console (with or without quotes), it runs the video file. I've attached the playlists from the working (no spaces) and non-working (spaces) runs (removed spaces from folder path). It looks like the VLC program doesn't cope with spaces very well. I can solve the problem by making my directory structure (and probably my filenames) without any spaces. Aside from that problem, your VLC implementation works well. I cannot fully express my gratitude for the help you have given me. I will try to pay it forward. Thanks! Carl VLC-Playlist.xspf VLC-Playlist.xspf
  11. I pasted the code into a new SciTE file, but I didn't save it out. I hit the F5 key and nothing happened, so I figured something was broken in the file. After reading your question, I made a new file, pasted the text into it, and then saved it out with an arbitrary filename. After that process, I hit the F5 again and got VLC errors" Your input can't be opened: VLC is unable to open the MRL 'file:///C:/Users/Carl/Documents/AutoIt/Monk'. Check the log for details. Your input can't be opened: VLC is unable to open the MRL 'file:///C:/Users/Carl/Documents/AutoIt/Monk%20Season%201/Season'. Check the log for details. Your input can't be opened: VLC is unable to open the MRL 'file:///C:/Users/Carl/Documents/AutoIt/Monk%20Season%201/1/VLC-Playlist.xspf'. Check the log for details. I will check the log tomorrow morning to see what other things I can do. You've worked hard today . . . you can take the rest of the day off . . . It looks like AutoIt doesn't accept the F5 key (Go) until after the file is saved with a filename. I tested this with a blank file - File/New, then hit F5 - nothing happened. File/Save (give arbitrary filename) then F5 performs the Go action on the empty (but named) file. Thanks for all the help, Carl
  12. This doesn't seem to do anything in stand-alone mode. Do I need to splice it into my current code? I'll be out for the rest of the evening and will check back tomorrow. Thanks, Carl
  13. My initial searches for how to start experiments with the send media keys was unsuccessful. I was unable to locate the starting point as how to invoke the media player so I could send keys/commands to it. Are there some search terms that would help me to find that starting point? Thanks, Carl
  14. That check is good (and it works). The Monk videos I have contain the English audio on track 2 and the English captions on the second channel. I've been unable to get WMP to show me the subtitles, but they are visible in the VLC player. Is there any way for me to substitute the VLC player for the call to WMP? My tablet is supposed to be here next Monday (instead of today, as promised), so I've been tweaking button sizes to make the exit button much smaller (and harder to accidently hit). Later, Carl
  15. OK, I think you've given me all the pieces I need to work with over the next week. I'll report the results of my hack/mods as I polish the code framework. Thanks for your great contribution to my dad's new home entertainment system.
  16. What video player is being used by the program? The VLC player has settings that can control screen modes and monitor choices.
  17. OK. I'll try some variations tonight. The system works as expected, and with your changes as a functional starting point I'll be doing minor hack/tweaks to optimize it after my tablet arrives. I'll let you know if I have success with the auto-positioning. Thanks, Carl
  18. Starting at line 34 I have: Else $playList = _FileListToArrayRec($sFolder, StringReplace("*." & $fileTypes, " ", ";*.")) If Not IsArray($playlist) Then MsgBox(0, "", "This program should reside in the driectory where video files are located.") Exit EndIf $playList[0] = $playList[1] $currentFile = $playList[0] $playID = 1 EndIf is this correct? After I save the file into the video directory I can run it and the buttons work! I'll move the compiled program to the laptop I'm using (until the tablet arrives) and try it with my TV as the video output source. I should be able to get it tested later tonight. Thanks, Carl
  19. I get an error when I execute the script. Here is the output window: >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\Carl\Documents\AutoIt\CarlPlay\zPlayer_Carl.au3" /UserParams +>16:00:57 Starting AutoIt3Wrapper (21.316.1639.1) from:SciTE.exe (4.4.6.0) Keyboard:00000409 OS:WIN_10/2009 CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper >Running AU3Check (3.3.14.5) params:-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 from:C:\Program Files (x86)\AutoIt3 input:C:\Users\Carl\Documents\AutoIt\CarlPlay\zPlayer_Carl.au3 +>16:00:58 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\Carl\Documents\AutoIt\CarlPlay\zPlayer_Carl.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. "C:\Users\Carl\Documents\AutoIt\CarlPlay\zPlayer_Carl.au3" (36) : ==> Subscript used on non-accessible variable.: $playList[0] = $playList[1] $playList^ ERROR ->16:00:59 AutoIt3.exe ended.rc:1 +>16:00:59 AutoIt3Wrapper Finished. >Exit code: 1 Time: 2.697 is this something I can fix? Thanks, Carl
  20. I can manually configure the second monitor and move the video display window to the second monitor (my TV) with the existing code. If the video could be programmatically set to the second monitor, it would be convenient, but that function is not necessary. I've been testing with my desktop PC for most of the work, and then I moved the .exe to a laptop, which was able to prove the concept, so I just ordered a tablet for the final installation. If you have any interim versions available, I'd be happy to test and reply. Is it worth trading a direct contact method? Thanks, Carl
  21. Wow! Custom software! I have it partially working in my preferred version. I made a single Pause button filling most of the main display (covering up the other dialog windows) that stops and starts the video in the secondary HDMI display. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Users\Carl\Documents\AutoIt\CarlPlay\BigPause.kxf Global $Form1 = GUICreate("Form1", 1212, 682, -1, -1) Global $Pause_Play = GUICtrlCreateButton("Pause_Play", 152, 16, 995, 625) Global $nMsg GUICtrlSetFont(-1, 120, 400, 0, "Arial Rounded MT Bold") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ; end Carl init - - - - - code near the end of your main: If $trayMsg = $tray1 Then MyWindow() If $trayMsg = $tray2 Then MyExit() ;Carl code - big button stuff - - - - $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Pause_Play MyPause() EndSwitch ;Carl code end - - - - - WEnd My implementation hack breaks the functioning of the pop-out video control. If I knew the necessary and sufficient requirements for my button functions, along with where in the code to place them, I could probably do them myself. At first I thought I needed to turn off the other windows, but making a big button group that mostly covers up the other stuff would work, too. The important things for the ultra-simple control are: 1. dual screen with the second screen being the HDMI TV screen (full screen mode if possible) 2. Button control on primary tablet screen (full screen mode if possible) 3. Buttons - Giant (90% of screen) Pause (required), small Previous and Next (optional), and very small (corner, hard to hit) exit. This is because his eyes are bad, his fingers are bad, his memory is bad. If he exits, the memory-care staff will need to restart and set up his system. 4. If possible, the system will power up running the app after windows starts, continuing with the most recently paused location or the next video in the list. 5. Maintenance, setup, and other expert functions could be accessed with touchscreen or mouse and keyboard. Any help would be appreciated. Thanks for the amazing code (and thanks to AutoIt!), Carl
  22. I found the zplayer and got excited. My 95-year-old dad has dementia and is in his 6th viewing of the 8-season Monk series. Changing the DVDs takes a lot of our time, so I plan to make a tablet PC with a simple screen with Pause, Next, and Previous buttons. The second display can be his HDMI TV. I can put the sequentially named videos in a folder and they can play "forever" for him. I've spent about 10 hours trying to make things work and I'm not making very good progress. I've made the buttons work, but I'm having trouble understanding how to not have all the other display windows "in the way". Is there any top level documentation (beyond the code comments) that could help me to understand how to get my desired result? Thanks, Carl
×
×
  • Create New...