Simple status bar

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
buckw1
Junior Coder
Posts: 20
Joined: Sun Sep 18, 2005 5:08 am

Simple status bar

Post by buckw1 » Sat May 13, 2006 8:55 pm

Hi,
I need a simple status bar with no top label,border, so forth. Very much like a tooltip/hint pop up. I've tried message and various dialogs and they all display additional stuff beside the item status variable I want. Is the visual basic tooltip command the only solution?

Buck

User avatar
JRL
Automation Wizard
Posts: 3517
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue May 16, 2006 8:23 pm

Update,
Marcus has posted a script that disables the title bar in a dialog. It is available HERE

I have posted the script that I mentioned (later in this message) that does context sensitive help in a dialog HERE


Buck,

I spent some time this noon searching with Google to see if there was any script out there capable of creating a Title Bar free window. I'm not a programmer, and I did not understand the script samples that were offered, but the authors of the scripts said that you must have a full screen window to do it. I'm certain that I've seen popup ads that didn't have a title bar and were small floating windows. But perhaps they only function within the context of a larger window. In any case it occurred to me that if you use the title bar as your message medium, you could have a one line message in a blue floating window. The script that follows provides a sample of what I'm talking about.

Start the script and a dialog box should come up. Whatever text you enter into the "Message Text" field should appear in a windowless title bar when you select the "Process" button. The duration field is the window's timer in seconds, and the text factor field will let you play with the width of the title bar. the width of the tile bar is the number of characters in the message, multiplied by the "text factor". The text factor does not need to be a whole number, it can be a decimal. 10 seemed to be a good starting point for me, but it may depend on your display settings font choice.

If you have come up with a better solution or if someone else has a better solution, please post it. If you have a way to use VB "tooltips", I'd like to see that. I have a concept for context sensitive help for a Macro Scheduler dialog but no good way to display the help text.

Hope this is helpful,
Dick


Let>k=1
Let>FromTheTop=100
Let>BelowTheTop=%FromTheTop%+250

Dialog>Dialog1
Caption=Message window entry form
Width=445
Height=128
Top=%FromTheTop%
Left=CENTER
Close=0
Resize=0
Label=Message text,8,8
Label=Message duration,140,56
Label=Text factor,173,81
Edit=msEdit1,8,25,425,
Edit=msEdit2,230,50,80,5
Edit=msEdit3,230,75,80,10
Button=Cancel,358,56,75,25,2
Button=Process,8,56,75,25,3
Default=Process
EndDialog>Dialog1

Show>Dialog1
Label>start
GetDialogAction>Dialog1,r1
If>r1=3,Process
If>r1=2,finish
Wait>0.01
Goto>start

SRT>Process
IfFileExists>%TEMP_DIR%~BorderOnlyDialog~.scp
DeleteFile>%TEMP_DIR%~BorderOnlyDialog~.scp
EndIF

ResetDialogAction>Dialog1
Len>%Dialog1.MSEdit1%,len
Let>wide={int(%len%*%Dialog1.MSEdit3%)}
add>k,1
WriteLn>%TEMP_DIR%~BorderOnlyDialog~.scp,wresult,Dialog>Dialog%k%
WriteLn>%TEMP_DIR%~BorderOnlyDialog~.scp,wresult, Caption=%Dialog1.MSEdit1%
WriteLn>%TEMP_DIR%~BorderOnlyDialog~.scp,wresult, Width=%wide%
WriteLn>%TEMP_DIR%~BorderOnlyDialog~.scp,wresult, Height=0
WriteLn>%TEMP_DIR%~BorderOnlyDialog~.scp,wresult, Top=%BelowTheTop%
WriteLn>%TEMP_DIR%~BorderOnlyDialog~.scp,wresult, Left=CENTER
WriteLn>%TEMP_DIR%~BorderOnlyDialog~.scp,wresult, Close=0
WriteLn>%TEMP_DIR%~BorderOnlyDialog~.scp,wresult, Resize=0
WriteLn>%TEMP_DIR%~BorderOnlyDialog~.scp,wresult,EndDialog>Dialog%k%
WriteLn>%TEMP_DIR%~BorderOnlyDialog~.scp,wresult,show>dialog%k%
WriteLn>%TEMP_DIR%~BorderOnlyDialog~.scp,wresult,wait>%Dialog1.MSEdit2%

Run>%COMMAND_LINE% %TEMP_DIR%~BorderOnlyDialog~.scp
END>Process

Label>finish

buckw1
Junior Coder
Posts: 20
Joined: Sun Sep 18, 2005 5:08 am

Post by buckw1 » Wed May 24, 2006 6:15 pm

Well that script worked very nicely. Thank you!

I'm sure someone could make a VB call for a tooltip and I hope someone will, very useful for showing progress of a macro.


Buck

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts