Jump to content

CmdrVimes

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

175 profile views

CmdrVimes's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I managed to get one of the modules I was linked to work. It's more or less what I was trying to do, but with a naming convention I don't like. Half tempted to try and change things, but probably won't Thanks for the help
  2. I followed both of the above links and sort of followed what was going on, but found it a bit confusing, so I've attempted my own thing and it sort of works: $dummyArray = StringSplit($testCase, ",") for $j = 1 to $j = 9 step 1 MsgBox(0,"loopy","entered j") $testArray[$i][$j] = $dummyArray[$j] Next It compiles fine. New problem though. If the code is as it is above, it never enters the for loop. If I change it to be "For $j = 0 to..." then it throws up the same incorrect number of subscripts error, regardless of what I change any $j values you (i.e. $testArray[$i][($j+1)] etc)
  3. I've got a CSV file I'm trying to read in. Each line in the file should be a separate entry in the array such that the sample file of 20,1,2,3,4,5,6,7,8 30,1,2,3,4,5,6,7,8 40,1,2,3,4,5,6,7,8 should be a 3x9 array and "look" like this: [(20,1,2,3,4,5,6,7,8) (30,1,2,3,4,5,6,7,8) (40,1,2,3,4,5,6,7,8)] My code is as follows: dim $testArray[1][9] while 1 $testCase = FileReadLine($testFile) if @error = -1 then ExitLoop $testArray[$i] = StringSplit($testCase, ",") $i = $i + 1 ;Increment $i redim $testArray[$i][9] WEnd I keep getting this error: Main.au3 (188) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $testArray[$i] = StringSplit($testCase, ",") ^ ERROR ->14:14:39 AutoIT3.exe ended.rc:1 No matter what variable I change in the $testarray[1][9] bit, it doesn't work, even if I remove the redim and only read in 1 line. Would appreciate some help on this
  4. I'm not loading the library directly, but I must assume that it is being loaded at some point: other functions like AU3_Run work, it's just AU3_ControlClick that does not. Edit: it's being loaded by the Header File.
  5. I have tried using older versions of the autoitx3.lib and .h files to no avail.
  6. Bit of a bump. Not been able to solve this over the weekend. Any suggestions from anyone?
  7. I have a small issue with ControlClick throwing up a LNK2019 error in Visual C++ 2010 Express. I'm a bit new to C++ (started learning 3 days ago to be precise) but I've done some C, Java, and of course AutoIT. I've already written this in AutoIT and it worked fine, I am just porting it to C++. void tabSelect() { int selected = 0; wchar_t tabText[5]; while (selected == 0) { AU3_ControlClick(L"", L"", L"[CLASS:SysTabControl32]", L"",1,175,30); AU3_WinGetText(L"",L"RS232",tabText,5); if (tabText == L"RS232") selected = 1; else AU3_ControlClick(L"", L"", L"[CLASS:SysTabControl32]", L"",1,175,10); } } To summarise: I'm selecting a tab labeled "RS232". The tab is designed (by the company who made it, badly) so that all of the tabs are merged into one large object so I have to click co-ordinates. Once clicked, I then have to check for the specific text "RS232" to be present on the whole screen. Anyway, this throws up an error: 1>------ Build started: Project: CTA5, Configuration: Debug Win32 ------ 1>main.obj : error LNK2019: unresolved external symbol _AU3_ControlClick@28 referenced in function "void __cdecl tabSelect(void)" (?tabSelect@@YAXXZ) 1>ocz.ocz.ukexportHardwareA001H05ExperimentsCPPCTA5DebugCTA5.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I've come across the LNK2019 before (I hadn't included the AutoITX3.lib file), but this time around I'm stumped as to what the issue is. Edit: I know I posted this in general help, but someone said it would be better in here so I've reposted. Sorry that it's a repost. Edit 2: After some trial and error (i.e. running some other AU3_ code) I've determined it is a problem with ControlClick only... which, as far as I can tell, probably means there is an error in the dll or lib file.
  8. I have a small issue with ControlClick throwing up a LNK2019 error in Visual C++ 2010 Express. I'm a bit new to C++ (started learning 3 days ago to be precise) but I've done some C, Java, and of course AutoIT. I've already written this in AutoIT and it worked fine, I am just porting it to C++. void tabSelect() { int selected = 0; wchar_t tabText[5]; while (selected == 0) { AU3_ControlClick(L"", L"", L"[CLASS:SysTabControl32]", L"",1,175,30); AU3_WinGetText(L"",L"RS232",tabText,5); if (tabText == L"RS232") selected = 1; else AU3_ControlClick(L"", L"", L"[CLASS:SysTabControl32]", L"",1,175,10); } } To summarise: I'm selecting a tab labeled "RS232". The tab is designed (by the company who made it, badly) so that all of the tabs are merged into one large object so I have to click co-ordinates. Once clicked, I then have to check for the specific text "RS232" to be present on the whole screen. Anyway, this throws up an error: 1>------ Build started: Project: CTA5, Configuration: Debug Win32 ------ 1>main.obj : error LNK2019: unresolved external symbol _AU3_ControlClick@28 referenced in function "void __cdecl tabSelect(void)" (?tabSelect@@YAXXZ) 1>\\ocz.ocz.uk\export\Hardware\A001H05\Experiments\CPP\CTA5\Debug\CTA5.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I've come across the LNK2019 before (I hadn't included the AutoITX3.lib file), but this time around I'm stumped as to what the issue is.
  9. I'm trying to connect to a serial port. I've been using PuTTY fine, but I want to be able to use Stdin and Stdout to access the data feed, so I'm trying to use plink. I've followed as much information as I can from here, but everybody just seems to use ssh and not serial. Anyway, so far my script has just one line: $plink = Run('C:\tools\PuTTY\plink.exe -serial COM1 -sercfg 9600,8,1,n,N') When the script runs, the command prompt appears for a split second before vanishing again. I have almost no command-line experience so I've no idea whether I'm calling plink properly anyway, but no processes appear in task manager, so I don't know what's going on with it.
×
×
  • Create New...