How to use a parameter inside quotes

I have been unable to figure out how to use a passed in parameter inside quotes. For example, how would I do this:

params fidelity, caseNumber, missileName

TypeText “customAppl.rhl08 -f caseNumber/ini_files/missileName.ini”
TypeText Return

if ImageFound("/case1/fidelity/missileName/RollRate") then
LogSuccess “fidelity missileName is generated correctly”

I’ve tried escaping the quotes, & and && but with no success.

Thanks!

Have you tried: <<“your stuff including quotes”>> ?

Yeah…I tried that already and it didn’t work. I can’t get the parameter name to actually translate to anything other than the word. Thanks for your suggestion.

Eggplant’s online documentation is severely lacking in real examples of different use cases. All they have is put examples which are not very useful since I don’t care to display any actual data.

This is how I would modify the code:

params varFidelity, varCaseNumber, varMissileName

    Log "My fidelity value is"&&varFidelty
    Log "My case number is"&&varCaseNumber
    Log "My missle name is"&&varMissleName

    set myCodeString to "customApril.rhl08 -f"&&varCaseNumber&slash&"ini_files"&slash&varMissleName&".ini"
Log "My code string is"&&myCodeString
set my imagePath to slash&"case"&varCaseNumber&slash&varFidelity&slash&varMissleName&slash&"RollRate"
Log "My image path is"&&myImagePath

TypeText myCodeString,Return

if ImageFound(image:(myImagePath)) then LogSuccess varFidelity&&varMissleName&&"is generated correctly."

//Slash is a predefined variable used when you want to call the punctuation and not the escape character
//If you are looking for an image in your Images folder that has a path based on passed parameters, //you will need to force SenseTalk to evaluate the path before it looks for the image
//placing myImagePath within parenthesis should resolve that issue.

HTH,
Dave

Thank you Dave! I will try this out and let you know how it went. Really appreciate it.

Hi paisak,
maybe this proposal may help as well:
If varFidelty, varCaseNumber and varMissleName are variables you may log them with
log merge(“any text: [[varFidelty]], [[varCaseNumber]], [[varMissleName]]”).
means use the merge function and put your variables in [[]].
BR

I tried it out Dave and it works perfectly! Thanks so much. It makes sense that I need to put those paths into a string that SenseTalk can understand and interpret when ready. Thank you for taking time out of your day to figure it out and write it down for me.

1 Like