01-31-2023, 11:03 PM
I would just lie a moment to say "Thank you" to everyone who replied. I got QB64pe working and it made a huge difference. Pardon my mansplaining while I do a little happy-dance around what has happened. A lot of people seem to be using QB64 to run old game programs. I wanted to use it to write some utilities to make batch file processing easier.
Most recently I am doing the following to process movie files:
Take folders full of MP4 video files and batch rename them with episode numbers and titles in the filenames.
Feed them into an app to compress/convert them to MKV, which also converts the MP4’s built-in TXG3 subtitles to SSA.
Feed the output to another app to extract the SSA subtitles.
Use BASIC to convert/clean the SSA files into SRT files, while stripping away closed captions.
Feed the compressed MKVs into another app along with the SRT subtitles and additional JPG cover art while stripping/changing/creating file data to produce a finished and properly formatted MKV, without extraneous tags/attachments.
Change the icon and creation/modification dates for the files.
Clean up the files/folders used in the process and pack away a log file of everything that was done.
Yes, that's all really time consuming manually, but has the potential to be really easy using a BASIC program. I had hoped to use file dragging and dropping so I wouldn't have to write an entire system of dialog boxes. But QB64 doesn't support file dragging and dropping on a Mac. So I tried using the clipboard to mass select files/folders, and that ran me into the problems listed previously with extracting Path information. Then some wonderful people pointed me towards QB64pe, and the _OPENFILEDIALOG$ and related commands. Wow what a difference! All the code I was going to have to write for dialog boxes and file selection was already written in a few simple commands! And I don't need to use the clipboard to get there!
I still had QB64 installed on my computer (macOS High Sierra). I installed the Xcode software anyway, and tried to install QB64pe, which failed. I was pointed to another build (qb64pe_osx-3.5.0-18-6b9274e64). That build installed properly but with a warning
Install warning.txt (Size: 11.19 KB / Downloads: 53) . I ran both versions at the same time and noticed a peculiarity with the clipboard, not the commands but the Mac clipboard itself. When I tried to copy something from the QB64pe IDE to the clipboard and paste it into a TXT file (using [CTRL]+c for the IDE and [CMD]+v for the Mac), it wouldn't work. Instead of pasting what I had just copied to the clipboard it pasted something I had copied earlier. But if I copied from a TXT file and pasted to the IDE, that did work. It also worked copying and pasting between IDEs. But if I then tried to past back to the TXT file the old info pasted again. It was as though there were 2 clipboards being used. The same thing happened when I tried it in the QB64 version. In the end, when I rebooted and tried again everything had fixed itself. The clipboard acts normally now. But the file path problems I had with the clipboard haven't changed.
Fortunately the new commands available in QB64pe make the clipboard stuff irrelevant at the moment. I can use the pe commands for my interface and don't need to resort to using the clipboard. So far everything I've tried in QB64pe has worked as designed, with only one small glitch. When I go to options>display and change the default window width, it sometimes takes a couple of tries before it accepts the change. Not a big deal.
Thanks to QB64pe and the people in this forum I am now on my way towards a better and simpler version of my program, and really looking forward to coding again!
By the way, I was asked if the dialog box commands worked well on the Mac. So far they work beautifully, with one tiny annoyance. _OPENFILEDIALOG$ creates a dialog box in the middle of the screen. I am not aware of a method for determining where it opens. I can click on it and move it, but the next time it opens it goes back to the middle of the screen instead of where it was the last time I closed it. This is so trivial I almost didn't mention it. But since development is ongoing I supposed I should say something.
Most recently I am doing the following to process movie files:
Take folders full of MP4 video files and batch rename them with episode numbers and titles in the filenames.
Feed them into an app to compress/convert them to MKV, which also converts the MP4’s built-in TXG3 subtitles to SSA.
Feed the output to another app to extract the SSA subtitles.
Use BASIC to convert/clean the SSA files into SRT files, while stripping away closed captions.
Feed the compressed MKVs into another app along with the SRT subtitles and additional JPG cover art while stripping/changing/creating file data to produce a finished and properly formatted MKV, without extraneous tags/attachments.
Change the icon and creation/modification dates for the files.
Clean up the files/folders used in the process and pack away a log file of everything that was done.
Yes, that's all really time consuming manually, but has the potential to be really easy using a BASIC program. I had hoped to use file dragging and dropping so I wouldn't have to write an entire system of dialog boxes. But QB64 doesn't support file dragging and dropping on a Mac. So I tried using the clipboard to mass select files/folders, and that ran me into the problems listed previously with extracting Path information. Then some wonderful people pointed me towards QB64pe, and the _OPENFILEDIALOG$ and related commands. Wow what a difference! All the code I was going to have to write for dialog boxes and file selection was already written in a few simple commands! And I don't need to use the clipboard to get there!
I still had QB64 installed on my computer (macOS High Sierra). I installed the Xcode software anyway, and tried to install QB64pe, which failed. I was pointed to another build (qb64pe_osx-3.5.0-18-6b9274e64). That build installed properly but with a warning
Install warning.txt (Size: 11.19 KB / Downloads: 53) . I ran both versions at the same time and noticed a peculiarity with the clipboard, not the commands but the Mac clipboard itself. When I tried to copy something from the QB64pe IDE to the clipboard and paste it into a TXT file (using [CTRL]+c for the IDE and [CMD]+v for the Mac), it wouldn't work. Instead of pasting what I had just copied to the clipboard it pasted something I had copied earlier. But if I copied from a TXT file and pasted to the IDE, that did work. It also worked copying and pasting between IDEs. But if I then tried to past back to the TXT file the old info pasted again. It was as though there were 2 clipboards being used. The same thing happened when I tried it in the QB64 version. In the end, when I rebooted and tried again everything had fixed itself. The clipboard acts normally now. But the file path problems I had with the clipboard haven't changed.
Fortunately the new commands available in QB64pe make the clipboard stuff irrelevant at the moment. I can use the pe commands for my interface and don't need to resort to using the clipboard. So far everything I've tried in QB64pe has worked as designed, with only one small glitch. When I go to options>display and change the default window width, it sometimes takes a couple of tries before it accepts the change. Not a big deal.
Thanks to QB64pe and the people in this forum I am now on my way towards a better and simpler version of my program, and really looking forward to coding again!
By the way, I was asked if the dialog box commands worked well on the Mac. So far they work beautifully, with one tiny annoyance. _OPENFILEDIALOG$ creates a dialog box in the middle of the screen. I am not aware of a method for determining where it opens. I can click on it and move it, but the next time it opens it goes back to the middle of the screen instead of where it was the last time I closed it. This is so trivial I almost didn't mention it. But since development is ongoing I supposed I should say something.