Jump to content

Googamanga

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by Googamanga

  1. This is awesome, I use this all the time!!!
  2. I have an Excel sheet that is linked to a source text file. The link to the source source file needs to be changed periodicaly to another file. Currently, to change the link to another source file I open up excel and click on "Refresh All" which asks me the name of the new source file. I am trying to automate this process. Another important challenge is that the text file needs to be linked to Cell "B2", Column A and Row 1 are populated with important equations. I havn't found a way to do this UDFs. I tried looking at the source code of the Excel UDFs and only got more confused. I ran a macro in excel of what i need to and the following cme out. This is what i need to do in AutoIt. Please help! ############ IN VBA ########### Range("B2").Select With Selection.QueryTable .Connection = _ "TEXT;K:\CostDownloads\Vendor\Source\2010\Vendor20091230-05.txt" .TextFilePlatform = 437 .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = False .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = True .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _ 1, 1, 1) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With ############ IN AUTOIT ############ Local $Excel = ObjCreate("Excel.Application") $Excel.Visible = True ;;http://msdn.microsoft.com/en-us/library/aa215950(office.11).aspx $Excel.Workbooks.Open("K:\CostDownloads\Vendor\Import\Vendor_Import_Template.xls", 2, False) ;;http://msdn.microsoft.com/en-us/library/aa195811(office.11).aspx With $Excel.Workbook.WorkSheets(1).Range("B2").QueryTable .Connection = "TEXT;K:\CostDownloads\Lexis\Source\2010\Lexis20091230-05.txt" .TextFilePlatform = 437 .TextFileStartRow = 1 .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = False .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = True .TextFileSpaceDelimiter = False .Refresh endWith
  3. is there an easy way to rename a file using autoit? i'm downloading a .CSV file but the application I need to use after only takes .TXTs
  4. When my boss wasn't looking.... i tried the modified version, it didn't work for me.
  5. I couldn't get _ExcelBookAttach to work, I ended up using controlClick, and several other lines to get what i needed. The change in ExcelBookAttach would add much more functionality to the function!
  6. I couldn't get it to work, but i could be using it wrong... the excel seems to be a control of IE, or perhaps a child... i'm in over my head right now...
  7. not sure but check the attachment the menu is excel style not IE...
  8. I have Internet explorer window that showes an excel wroksheet, how do I save the excel sheet as .CSV in a given folder using COM?
  9. http://www.mjtnet.com/demos/irdemo.html
  10. the explorer is an .exe file you can run it and enter the folder you would like to look up, i've used this in a gui with some buttons to open a specific folder Run("explorer.exe") $errorCheck = WinWait("[class:ExploreWClass]", "", 5) If Not $errorCheck Then MsgBox(0, "Error", "WinWait timed out while opening Explorer.exe") Exit EndIf ControlFocus("[class:ExploreWClass]", "", "Edit1") Send("C:\Documents and Settings\All Users\Documents\My Music\Sample Music") Sleep(500) Send("{enter}")
×
×
  • Create New...