Site Logo
Site Logo
 
It is currently Sat Mar 25, 2017 1:00 am

All times are UTC [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
 Post subject: Can you do images in a message box popup?
PostPosted: Thu Feb 19, 2015 4:53 pm 
Offline
DELCAM User
DELCAM User

Joined: Thu Feb 12, 2015 4:05 pm
Posts: 13
Just a thought, wondering if you can have a image on a message box popup rather than text? If so, is there a path it needs to be in? Or an exact file extension?

_________________
CNC Programmer
Cavalier Tool & Manufacturing Ltd.
Windsor, Ontario


Top
 Profile  
 
 Post subject: Re: Can you do images in a message box popup?
PostPosted: Thu Feb 19, 2015 4:57 pm 
Offline
Site Admin

Joined: Wed Feb 16, 2005 4:57 pm
Posts: 668
Location: Birmingham, UK
No, you can't.


Top
 Profile  
 
 Post subject: Re: Can you do images in a message box popup?
PostPosted: Thu Feb 19, 2015 5:25 pm 
Offline
DELCAM User
DELCAM User

Joined: Thu Feb 12, 2015 4:05 pm
Posts: 13
Thanks for the speedy reply good sir.

_________________
CNC Programmer
Cavalier Tool & Manufacturing Ltd.
Windsor, Ontario


Top
 Profile  
 
 Post subject: Re: Can you do images in a message box popup?
PostPosted: Thu Feb 19, 2015 6:17 pm 
Offline
DELCAM Guru
DELCAM Guru

Joined: Fri Jan 10, 2014 4:38 pm
Posts: 507
Location: Switzerland
It would be fine to have the possibility of reformat text (font size+red+bold) and add pictures for important warnings or messages.

_________________
Thank you !

Olivier


Top
 Profile  
 
 Post subject: Re: Can you do images in a message box popup?
PostPosted: Fri Feb 20, 2015 10:12 am 
Offline
DELCAM Staff
DELCAM Staff
User avatar

Joined: Mon Aug 09, 2004 3:55 pm
Posts: 1463
Location: Birmingham UK
There are bunch of INFOBOX commands

Code:
// SIMPLE example using pre-set formats
INFOBOX NEW "My Title"

INFOBOX STYLE "HEADING"
INFOBOX APPEND "Some Heading Text\n"
INFOBOX APPEND "More Heading Text\n"
INFOBOX STYLE "NORMAL"
INFOBOX APPEND "Some Normal Text\n"
INFOBOX APPEND "More Normal Text\n"
INFOBOX STYLE "WARNING"
INFOBOX APPEND "Some Warning Text\n"
INFOBOX APPEND "More Warning Text\n"

WAIT 1.0

INFOBOX CLOSE


// Example using variables
//  and custom formats

STRING title = "Title from var"
STRING sometext = "Some variable text"
int list red = {255,0,0}
int list green = {0,255,0}
int list blue = {0,0,255}
bool isbold = true
bool isitalic = true
bool underline = true


INFOBOX NEW $title

INFOBOX APPEND "Some Heading Text\n"
INFOBOX APPEND "More Heading Text\n"
INFOBOX STYLE "NORMAL"
INFOBOX APPEND "Some Normal Text\n"
INFOBOX APPEND "More Normal Text\n"
INFOBOX STYLE "WARNING"
INFOBOX APPEND "Some Warning Text\n"
INFOBOX APPEND "More Warning Text\n"

INFOBOX STYLE "NORMAL"
INFOBOX APPEND "%[sometext] -> variable in string\n"

INFOBOX STATE "text_colour" $green
INFOBOX STATE "font_face" "monospace"
INFOBOX STATE "auto_newline" TRUE
INFOBOX APPEND $sometext
INFOBOX APPEND "monospace font, green colour, and new line auto-added"

INFOBOX STATE "auto_newline" FALSE
INFOBOX STATE "text_bg_colour" $red
INFOBOX APPEND "some text with red BG, "
INFOBOX CLEAR "text_bg_colour"
INFOBOX STATE "bold" $isbold
INFOBOX APPEND "bold text, "
INFOBOX STATE "BOLD" FALSE
INFOBOX STATE "italic" $isitalic
INFOBOX APPEND "some italic, "
INFOBOX STATE "italic" FALSE
INFOBOX STATE "underline" TRUE
INFOBOX APPEND "now it's underlined\n"

INFOBOX CLEAR FORMAT
INFOBOX APPEND "Cleared the format"

WAIT 1.0

INFOBOX CLEAR TEXT

INFOBOX STYLE "WARNING"

INFOBOX APPEND "Cleared the text off the screen and set a warning style\n"

WAIT 1.0

INFOBOX CLEAR

INFOBOX APPEND "Cleared the text and formatting at the same time"


Top
 Profile  
 
 Post subject: Re: Can you do images in a message box popup?
PostPosted: Fri Feb 20, 2015 10:45 am 
Offline
DELCAM Guru
DELCAM Guru

Joined: Fri Jan 10, 2014 4:38 pm
Posts: 507
Location: Switzerland
That already helps a lot ! Many thanks, Lloyd !

_________________
Thank you !

Olivier


Top
 Profile  
 
 Post subject: Re: Can you do images in a message box popup?
PostPosted: Mon Mar 02, 2015 2:41 pm 
Offline
DELCAM User
DELCAM User

Joined: Thu Feb 12, 2015 4:05 pm
Posts: 13
Wow, thanks for the reply Lloyd. That will give me something to try and learn how to do.

_________________
CNC Programmer
Cavalier Tool & Manufacturing Ltd.
Windsor, Ontario


Top
 Profile  
 
 Post subject: Re: Can you do images in a message box popup?
PostPosted: Mon May 16, 2016 3:45 pm 
Offline
DELCAM Guru
DELCAM Guru
User avatar

Joined: Mon Dec 14, 2009 5:46 pm
Posts: 341
The post of Lloyd on the INFOBOX commands is very complete , But I'm wondering if there is any way to change the police used in the Infoboxes ?


Top
 Profile  
 
 Post subject: Re: Can you do images in a message box popup?
PostPosted: Tue May 24, 2016 12:30 pm 
Offline
DELCAM Guru
DELCAM Guru
User avatar

Joined: Mon Dec 14, 2009 5:46 pm
Posts: 341
5axes wrote:
But I'm wondering if there is any way to change the police used in the Infoboxes ?

No one ?

Ok, Meanwhile here can be an idea for image display in PMILL. Why don't use the browser (PMILLHELP URL) to display your image ? hereafter my example for my screenshot + Macro

Suppose the following files are stored in the directory 'C:\dcam\config\macro'

Screenshot+.mac
Code:
// Init background color to White
EDIT COLOUR ViewBGTop 1.00000 1.00000 1.00000
EDIT COLOUR ViewBGBottom 1.00000 1.00000 1.00000
// Undraw tool to keep only geometrical element
UNDRAW TOOL ALL
KEEP BITMAP FILESAVE "C:\Temp\vue.jpg" YES
PMILLHELP URL 'c:\dcam\config\macro\Screenshot.html'
// Reset background color to My personal Settings
EDIT COLOUR ViewBGTop 0.19216 0.29412 0.37647
EDIT COLOUR ViewBGBottom 1.00000 1.00000 1.00000

Screenshot.html
Code:
<html>
   <head>
   <script language="javascript">
   // Get the PowerMILL object
   var PowerMill = top.external;

   function ShootAgain_click(){
   PowerMill.Execute ("Macro 'C:\\dcam\\config\\macro\\screenshot+.mac'",1);
   }
   </script>
   </head>
   <body>
   <h1>SCREENSHOT PREVIEW</h1>
   <form>
   <input type="button" value=" shoot again ! " onClick="ShootAgain_click();" />
   </form>
   <div align="center">
   <img style="margin: -4px 400px -4px 5px" src="c:/Temp/vue.jpg" alt="ScreenShot" height="70%" />
   </div>
   <div align="right">
   <p>Screenshot Preview : <a href="c:/Temp/vue.jpg" target="_blank">vue.jpg</a></p>
   </div>
   </body>
</html>


Attachments:
ScreenShot.jpg
ScreenShot.jpg [ 488.61 KiB | Viewed 163 times ]

_________________
“If you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas”
George Bernard Shaw
Top
 Profile  
 
 Post subject: White background screenshot
PostPosted: Thu Jun 09, 2016 9:19 pm 
Offline
DELCAM Guru
DELCAM Guru
User avatar

Joined: Mon Dec 14, 2009 5:46 pm
Posts: 341
I found what I'm looking for a while : screenshot+.mac whith WHITEBG
Code:
UNDRAW TOOL ALL
KEEP BITMAP WHITEBG FILESAVE "C:\Temp\vue.jpg" YES
PMILLHELP URL 'c:\dcam\config\macro\Screenshot.html'

_________________
“If you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas”
George Bernard Shaw


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB