Class1 has a string property , “companyName” that I am trying to update via xojoscript
Dim myclass As new Class1
dim mycompany as String=“Test Co”
Dim scriptsource As String = “myclass.companyName=” + chr(34) + mycompany + chr(34)
Dim script As New XojoScript
app.myscript=script
app.myscript.Context =myclass
app.myscript.Source = scriptsource
app.myscript.Run
Window1.Title=myclass.companyName
Break
Now I am trying fill a text filed that has an “=” in it
Full_Name=left(Full_Name,3) + “-” + Full_Name //// works fine
custom_AddressScript =Full_Name + “=” +left(Full_Name,3) + “-” + Full_Name
The above works but I get the results of Full_Name + “=” +left(Full_Name,3) + “-” + Full_Name
which makes sense but when I try wrap the cmd with quotes custom_AddressScript =“Full_Name + “=” +left(Full_Name,3) + “-” + Full_Name” which is what I want.
New questions not related to the original question should be posted in a new thread.
Please format source code by wrapping it with the code tags. It is the button with the empty sheet and the <> brackets. It makes it much easier to grasp the code.
Thanks for the info,
Should I move/ start a new thread?
When using custom_AddressScript = "Full_Name + ""="" +left(Full_Name,3) + ""-"" + Full_Name"
unfortunately custom_AddressScript ends up
In such cases, it might be advisable to use a constant and insert placeholders. Then in code, replace the placeholders with the actual data. This method benefits readability and reduces the chance of errors, especially if you happen to have longer code blocks.
Also, when using constants you don’t need to double-quote.