Hi! I'm trying to write a c++ script that takes an excel (.csv) file as input. For background, I'm on Windows 7, am using the iMacros browser, and am running version 12.0.501.6698.
I can read the input into a std::string and parse that easily, but cannot do the same with System::String^. However, all the iMacros commands don't take std::string as input — they take System::String^. The issue is that I can parse std::string, but can't run iMacros commands with it. On the converse, I can't parse System::String^, but can run iMacros commands with it.
For example: (assume all variables are defined, etc.)
Code: Select all
std::string normalString = "CODE:URL GOTO=https://www.google.com/"; // creates a normal string
System::String^ clrString = "CODE:URL GOTO=https://www.google.com/"; // creates a clr String
app->iimPlay(normalString, TIMEOUT); // doesn't compile b/c iimPlay takes System::String as input
app->iimPlay(clrString, TIMEOUT); // works fine
getline(inputFile, normalString); //works fine, getline sets normalString to a line from inputFile
getline(inputFile, clrString); // doesn't compile
clrString = normalString; //also doesn't compile
Is there a way to convert from std::string/cstring/char array to System::String^? Thanks!