View forum topic
List of forum topicsSubject: replacech
I tried to remove a string with replacech in the serial ("-")
Serial is the global variable
macrox_getstr("serial",cserial)//macro into variable
cserial = cserial.replacech(cserial,"-","")
But i always get the error message
"The value has the different type from the definitaion od the functions @replacech"
But serial is a string variable?
Please help, maybe you can show me a working sample to replace a string in the serial
Regards
Manfred
Try this
macrox_getstr("serial",cserial)//macro into variable
cserial.replacech(cserial,'-',"")
But we recommend you to use 'Modify Variable' command.
It has 'Replace letter' action. So, you can easу replace "-" inside serial variable.
Thank you for your prompt reply.
I think the problem was that i used " instead '.
Anyway but how can i use "modify variable"
I just want to replace all '-' in the serial variable, after the user input.
Thank you
Manfred
Ok i think something like -#space# in the parameter column,
but how can i delete the charcter or replacing with nothing??
Thank you
Manfred
Yes, you are right. Unfortunately, Modify variable cannot delete characters.
So, use replacech method in Source Code command.
January 16, 2025 Installer CreateInstall 8.11.1 was released.
June 19, 2024 Installer CreateInstall 8.11.0 was released. read more
November 13, 2022 Installer CreateInstall 8.10.1 was released.
May 21, 2022 Installer CreateInstall 8.10.0 was released.
September 25, 2021 Installer CreateInstall 8.9.0 was released.
July 15, 2021 Installer CreateInstall 8.8.1 was released.