Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Don't look now developers, but you've got a pat on your back!
#1
[Image: wheel-of-fortune-pat-sajak-wrestle-mc-230322-4f43bf.jpg]

Well, maybe not Pat Sajak, but a big pat on the back from me for the _MessageBox work!

I used to have to make either a program popup with PCOPY or a separate program to make a window for things like app help. Now with _MessageBox, that can be accomplished regardless of the program window dimensions and all within the app itself. Here is an example I am including in a soon to be posted WIP.

Code: (Select All)
Restore help
Do
    Read d$
    If d$ = "eof" Then Exit Do
    help$ = help$ + Chr$(13) + Chr$(10) + Chr$(13) + Chr$(10) + d$
Loop
_MessageBox " App Help", help$, ""
help:
Data VidName Video Renaming App.
Data "-----------------------------------------------------"
Data F1 to past the name of the file selected from a folder.
Data F2 or "File" button to Open a folder to select a file.
Data Enter or "Save" button to process the event.
Data Ctrl + D or "Dest" to select a destination folder for move or copy to a different folder.
Data Ctrl + D or "Dest" can also be used to add a folder to the scrolling mouse wheel list of folder destinations.
Data Ctrl + Enter or "Copy" button to copy the file to a different folder with rename options.
Data Ctrl + Delete to PERMANENTLY delete file. No button. Hopefully "
cat proof."
Data Right mouse click to display select all/cut/copy/paste/close menu actions in title bar. Scroll with mouse wheel inside app window and right or middle click to select.
Data Mouse wheel in app window to scroll folder list made with "
Dest" selections.
Data Mouse wheel to scroll select all/cut/copy/paste/close menu actions if a right click was previously made to display those options in the title bar.
Data No need to type extensions. The extension will be the same as the loaded file.
Data Run app. A directory window will open. Select the folder then select a vid. Vid will open in the default video player.
Data The video name will appear highlighted in the input field. Make any edits to the name while watching the video.
Data Save the name to add the event to the queue. The app will ask to open the next vid to unlock the file from the player.
Data Esc or X in title bar at anytime to quit. The app will ask to save any event in the queue before exiting.
Data eof

Oh, and that photo? No idea where it came from. My guess is just never try to buy a vowel from Pat if you have bad credit.

Bigly thanks!

Pete

- I Vanna bad boy.
Reply
#2
This is sweet! Thanks Pete!
Reply
#3
Big Grin
Reply
#4
@pete
I like it a lot.  Can I use different restores to point to multiple data sections ?  Then I can multiple different messages to box.

Thanks another subroutine to toolbox.
Reply
#5
@doppler to gain access to any DATA line, use a counter to READ them up to that certain one and when it reaches the number that you want the DATA line to say, send that to the _MessageBox. Oh and yes you have to use RESTORE every time. Here is an example: 

Code: (Select All)

Do
    again:
    Input "Weekday Number: ", weekday
    If weekday > 7 Or weekday < 1 Then GoTo again:
    Restore days
    For t = 1 To weekday
        Read d$
    Next t
    _MessageBox " Weekday:", d$, ""
Loop
days:
Data Sunday
Data Monday
Data Tuesday
Data Wednesday
Data Thursday
Data Friday
Data Saturday
Reply
#6
@doppler

I would love QB64 to have...

On x Restore MyData1, MyData2, MyData3

but since no one has developed that function, you need to do something like...

Select Case x
   Case 1: Restore MyData1
   Case 2: Restore MyData2
   Case 3: Restore MyData3
End Select

Pete
Reply
#7
@pete
I can think of a 1000 uses for message box now.  Different help box's for what ever section of code you are in.  For 1 use.
Reply
#8
Great Pete!
I like it. Good job.
So you've leaved the ASCII SCREEN 0 comfort zone?
Reply




Users browsing this thread: 4 Guest(s)