Jump to content

richietheprogrammer

Active Members
  • Posts

    153
  • Joined

  • Last visited

Everything posted by richietheprogrammer

  1. Thanks. Here is my non- working code: $FileList=_FileListToArray(@scriptdir) _ArrayDisplay($FileList,"$FileList") $newfile=FileOpen (@scriptDir & "Newfile.csv") If $newfile = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf for $i=0 to 3 $open= FileOpen(@scriptdir & "\" & $FileList[$i]) $read= fileread(@scriptdir & "\" & $FileList[$i]) filewrite($newfile,$read) fileclose($newfile) Next Here's whats wrong with this: It is not even creating the new file, even though it claims it opened it and wrote to it. Also, I want it to only loop through the csv files, and not any files. One more thing, the number of files are unknown, so how do I define the i? Thanks a lot!
  2. Hey guys, I have a bunch of csv files in a directory (not on a local drive, meaning I cant use batch files or cmd..). I Want to combine them all into one master csv file, regardless of the number of files. Any help is much appreciated!!
  3. Shoulda known csv is better for this. You are awesome! I will use this in my scipt! Thanks again
  4. hehe nice replies. Im look for specifics with excel functions. My code: #include <File.au3> #include <Excel.au3> #Include <Array.au3> $ID= inputbox("Employee ID","Enter Your employee ID") $name = inputbox("Employee ID","Enter Your Name") $sFilePath1 = @ScriptDir & "\SaveAsExample.xls" ; if fileexists($sFilePath1) = 0 Then $oExcel = _ExcelBookNew(0) _ExcelBookSaveAs($oExcel, @ScriptDir & "\SaveAsExample", "xls") else $oExcel =$sFilePath1 _ExcelBookopen($oExcel,0) endif _ExcelWriteCell($oExcel, $ID , 1, 1) ;Write to the Cell _ExcelWriteCell($oExcel, $name, 2, 1) ;Write to the Cell _ExcelBookClose($oExcel, 1, 0) ;This method will save then Close the file, without any of the normal prompts, regardless of changes This only works when the file is NOT existing. If the file is already there, nothing changes.. Any ideas? Also, how would I go around looping the cell numbers? Thanks!
  5. Hey guys, trying to write a script that takes a few inputs, and save them to an excel spreadsheet. I want it to check if the spreadsheet is already made in the given path, if it is, then it should write the new data on the next cell. Say I ask the user to input their name, ID, phone number. Once they do that, it should export it to an excel sheet. If the sheet is already present, just write the data below the existing data. Sounds simple, but I cant get it to work.. Examples? Any help is much appreciated!
  6. I wish i can just know the reason...
  7. More specifically, I know it is from the $Provisioning, because regardless of what comes after $Provisioning. , the same behavior occurs
  8. Is there any ways I can make sure it is IUnknown? Also, is there any way around that? Thanks! Also, would it help if I provide the software to you? P.S, this is from the automation readme: IQProvisioning Interface: ----------------------------- GetNVItem(VARIANT item)
  9. Thanks for this. I know already exactly where it is happening. It is in the following: $data= $Provisioning.GetNVItem($Item) So something about what you said earlier might be right, no?
  10. COM error handler did not change anything when I tried it. I know the handler works because it worked on another script, but that appears to work when the function actually fails. What is happening in my case is that Autoit is crashing, and when I hit cancel to debug, the console is saying exit code 0. I found a similar issue, here: Could this be that autoit doesnt support the "item" variable in this case, as stated previously? And how can i fix that? Any help is much appreciated.
  11. Not sure why you are saying this... here is beta's: Code: $oQPST = ObjCreate("QPSTAtmnServer.Application") $SelectedPort = $oQPST.GetSelectedPort $Provisioning = $SelectedPort.Provisioning() $item= 0 $Provisioning.GetNVItem($Item) Console: >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Program Files\AutoIt3\Beta\Examples\count-do.au3" >Exit code: 0 Time: 3.357 And I got the unhandled exception the same way the video shows.
  12. No go Same results with beta. This is strangeeee..
  13. hahaha you actually made me laugh
  14. Please disregard the first couple seconds in the video, as they are from another code, sorry to get you upset..
  15. Sorry about this. My code is the same mentioned in the original post. And the console output: >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\user\Desktop\com.au3" >Exit code: 0 Time: 8.262 which is not informative
  16. Yes, it is reported by windows. Can you please guide me in the right direction to get the new beta? What are you saying does make sense in this case, and I hope the beta will fix this.
  17. I hope this is not asking for too much, but I did a screencapture little avi, that you can get from http://www.megaupload.com/?d=4J3RNOS6 this way we are on the same page. But to answer your confusion, the unhandled exception shows in a separate window. Please see video. I appreciate all your help!
  18. Thanks for this. The same thing happens, and console write: >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\user\Desktop\com.au3" >Exit code: 0 Time: 3.507 after I choose to not debug the exception.
  19. Hi guys, running into an issue where autoit itself is crashing, not the script. I have a vbscript (COM reference) that works, and I am trying to convert it to an autoit script. Here are the details: set QPST = CreateObject("QPSTAtmnServer.Application") set SelectedPort = QPST.GetSelectedPort set Provisioning = SelectedPort.Provisioning Data = Provisioning.GetNVItem(Item) My autoit code: $oQPST = ObjCreate("QPSTAtmnServer.Application") $SelectedPort = $oQPST.GetSelectedPort $Provisioning = $SelectedPort.Provisioning $item= 0 $Provisioning.GetNVItem($Item) When the script gets to "$Provisioning.GetNVItem($Item)" , I get an unhandled autoit exception. Any ideas are much much appreciated !!
  20. Thanks guys I understand. But, say I have variables and functions in the script that I am including, can I call the same variable names/ functions in the new script?
  21. Hi guys, I read about "include" in the help file, and I have been using it to include preloaded files from autoit. My question is, say I have 2 scripts, and I want to combine them without putting them in one script, can I just use the "include" feature to include one script into another? Sorry for the noobie question, and thanks for any help!
  22. so you are suggesting that I copy the file from the lan to the c drive, and before the script is done, delete the file?
  23. The information is already in the csv files. I just dont want to put the csv files on all the local drives, regardless of which way I can do them. Oh and I have my code ready in autoit, but it works with a csv on the c drive that is being accessed from one computer.
  24. Not sure if that will work. Is there a way for all the computers on the lan to access one csv file at once that way?
×
×
  • Create New...