New Zealand
Asked — Edited
Resolved Resolved by Rich!

Print The Character To A File

Hi all...

Can anyone tell me how to write the " double quotation mark to a file...?

I can do this ...


FileWriteLine($filename, "'" )

But I can't do this...


FileWriteLine($filename, """ )

Here's what I'm doing... I have one EZB project called "Lawrence" that runs on three different computers in two separate geographical locations, a Vista downstairs in my home workshop, a Win 7 in my school classroom & a Win 8 tablet that I walk around with. I seldom work in the same location for any length of time so accessing my E Z Builder files via DROPBOX and Google Drive is a given.

I frequently improve on the project whenever and where ever I can and dropbox automatically copies the project to the other computers. Unfortunately at the moment I have to manually restart the project to load the new version at the other locations. I cannot use the LoadProject command as it does not support the autostart script and I would rather not do a full system reboot.

I have got around this in the past by using the following lines of code called from my within my project

 
# EZB PROJECT RELOAD AND RESTART
Saywait ("Updating project... Please wait." )
Exec ($Google_Drive_Folder + "\My Robotics\Batch Files\REBOOT.bat)
Sleep(1000)
Exec ($Google_Drive_Folder + "\My Robotics\Batch Files\kill ARC.vbs)

The batch REBOOT.BAT file with a ping command to slow execution follows...


REM REBOOT.BAT CALLED FROM EZB LAWRENCE PROJECT
c:
Echo off
ping 0.0.0.0
"C:\Program Files\EZ-Robot Inc\EZ-Builder\EZ-Builder.exe" "C:\Dropbox\My Robotics\Launcher.EZB" "Autostart"
"C:\Program Files (x86)\EZ-Robot Inc\EZ-Builder\EZ-Builder.exe" "C:\Dropbox\My Robotics\Launcher.EZB" "Autostart"
Exit

The two Autostart lines allow for the different platforms I use. Dirty but effective... Next I kill the E Z Builder App from within "Lawrence ...

The vb script looks like this...


' KILL ARC 
Set oShell = CreateObject ("Wscript.Shell" ) 
Dim strArgs
strArgs = "cmd /c taskkill /F /IM ARC.exe"
oShell.Run strArgs, 0, false

Anyway... I now need a way to write speech marks back to disk, into a batch file, created from within my project. From way back in my early days of programming I recall doing something like it being CHR$(32) but can't seem to find a suitable command or method to print the " character.

Is there a way I can do this in E Z Script ?


ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

United Kingdom
#1  

Easiest way I found for that when using the tellymate was to use the hex code for a " which is 0x22

So;

FileWriteLine($filename, 0x22 )

Or;

FileWriteLine($filename, 0x22 + "Some text" + 0x22)
PRO
New Zealand
#2  

Thanks Rich....

Does the job fine!