Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

ASCII 034


Recommended Posts

I am trying to open a txt file with the command Launch, but I need add the ascii 034 caracter before and after of my variable with the complete name of the file.

my_txt_var = 034 + my_txt_var + 034   < - - - - - -this sentence is wrong

result = launch( "notepad.exe", my_txt_var,0)

but It doesnt work. the error is that I am using numbers and string in the same operation.

Can Anybody help me to resolve that. Is there any way to use directly de ascii value?

Thanks to all for your help

 

 

 

Link to comment
Share on other sites
5 hours ago, eltklas said:

I found the solution.

There is a function for that


my_vble = no2asc(034) + my_vble + no2asc(034)

Thanks to all.

Sorry I didn't have time to dig into this one yesterday. I was thinking of a different way we use to go about this and that is nice and clean I like it. Thank you for posting back up the solution I appreciate you taking the time to do so. Have a good weekend. :cheers:

  • Like 1
Link to comment
Share on other sites
2 hours ago, eltklas said:

Yes, Is a string variable because it will store a file complete name and folder. 

Thanks

My point was more about the MP Language. Previously, you were required to define a String Variable, starting with the 's' character. I like to define all of my User Defined String Variables with 'str_', just to make it easier to keep track of "what is a number and what is a string".

I'm guessing that MP was enhanced at some point, to allow User Defined Strings which are not required to begin with 's'.

I was a bit surprised you weren't getting an error, since your variable name did not begin with that character.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...