
martmeister
Members-
Posts
19 -
Joined
-
Last visited
Everything posted by martmeister
-
Plz Help me find the error in my script
martmeister replied to martmeister's topic in AutoIt General Help and Support
-
I have looked under help and couldnt find the answer I was looking for. I know this is probably a really easy answer but I was needing to know how to select a worksheet in Excel if you have multiple worksheets. Thanks a lot
-
Plz Help me find the error in my script
martmeister replied to martmeister's topic in AutoIt General Help and Support
never mine i solved my pop-up problem -
Plz Help me find the error in my script
martmeister replied to martmeister's topic in AutoIt General Help and Support
It is still not working. It errors out when it open the file with "pic- autoit error message" is there something in excel where i can enable/disable this not to popup..?autoit error message.bmp -
Plz Help me find the error in my script
martmeister replied to martmeister's topic in AutoIt General Help and Support
thanks man. I will try that tonight and get back to you -
Here is my code: #include <Excel.au3> run ("C:\Program Files\Microsoft Office\Office12\EXCEL.exe") ;opens excel winwaitactive ("Microsoft Excel - Book1") sleep (900) Global $oExcel = _ExcelBookOpen("C:\Documents and Settings\programHopper.xlsm") WinWait("Microsoft Excel - programHopper.xlsm") Sleep(2000) $oExcel.Run("MacroHop") The Last Line Is Where Im Getting My Error..ehh, I dont know why its not running the macro called MacroHop The Macro is Part of the the program Hopper and works correctly when I manually run it so i know it works. I just need some help automating this. lol thanks!
-
Here is my code: #include <Excel.au3> run ("C:\Program Files\Microsoft Office\Office12\EXCEL.exe") ;opens excel winwaitactive ("Microsoft Excel - Book1") sleep (900) Global $oExcel = _ExcelBookOpen("C:\Documents and Settings\programHopper.xlsm") WinWait("Microsoft Excel - programHopper.xlsm") Sleep(2000) $oExcel.Run("MacroHop") The Last Line Is Where Im Getting My Error..ehh, I dont know why its not running the macro called MacroHop The Macro is Part of the the program Hopper and works correctly when I manually run it so i know it works. I just need some help automating this. lol thanks!
-
Running Script to Call Excel Macro.. Error?
martmeister replied to martmeister's topic in AutoIt General Help and Support
I was using a partial amount of code and didn't include the others lines -
Hey guys can you help me with this script.. Here is a part of the code: #include <Excel.au3> run ("C:\Program Files\Microsoft Office\EXCEL.exe") ;opens excel Send("C:\Documents and Settings\HopperVS2.xlsm") $oExcel.Run("FileHOP7") When the script get to running the macro it errors out with: $oExcel.Run("FileHOP7") $oExcel^ERROR error: expected a "=" operator in assignment statement .....Where is wanting me to put the = because i have never had this problem?? Thanks everyone for input!
-
Run excel macro within autoit
martmeister replied to gkeppler's topic in AutoIt General Help and Support
I have tried the $oExcel.Run("Move") Move being my macro name and it gives me an error: Expected a "a" in assignment statement.... What is wrong Do I need more than one line of code to run this macro? -
Im trying to get my macro "Move" to run but its not working ...... ..... ...... $oExcel.Run("Move") Will not run. When my program gets this far it pops up an error message "Error: Expected a "=" operator in assignment statement " .... .... .....
-
Below is part of my code. The problem is that the Excel read cell command is not reading the cell. What I'm wanting to do is for whatever the number 1-10 in the cell, Autoit will determine from # to run this macro/ or what this ... I have tried lots of things and I am still getting stuck in this same situation.. can some please help .. I have also implemented some you guys suggestions but I still get problems when the program hits the read cell.... The excel cell has 1 number in it with no calculation formulas so I know it is not the cell. IF someone can test a simple read cell if/then program from an excel cell please post a simple code... I thought this would be it up I must be doing something wrong on my part because I am just stuck right now with getting past this barrier. Thank a bunch guys! .... .... .... $oExcel = _ExcelBookOpen("C:\\ALL.xlsm") $val = _ExcelReadCell($oExcel, "DU1", 19) ; looks in cell to determine value for if then statement If $val = 1 then Send('!({F8})'); this runs a macro d.h. Send("{TAB}") Send("{DOWN}") Send("{ENTER}") ElseIf $val = 2 Then Send('!({F8})') Send("{TAB}") Send("{DOWN 4}") Send("{ENTER}") .... ...
-
Excel read cell.. HELP please
martmeister replied to martmeister's topic in AutoIt General Help and Support
I double checked it and it is correct -
Below is part of my code. The problem is that the Excel read cell command is not reading the cell. What I'm wanting to do is for whatever the number 1-10 in the cell, Autoit will determine from # to run this macro/ or what this ... I have tried lots of things and I am still getting stuck in this same situation.. can some please help .. . . . $oExcel = _ExcelBookOpen("C:\\ALL.xlsm") $val = _ExcelReadCell($oExcel, "DU", 19) ; looks in cell to determine value for if then statement If $val = 1 then Send('!({F8})'); this runs a macro d.h. Send("{TAB}") Send("{DOWN}") Send("{ENTER}") ElseIf $val = 2 Then Send('!({F8})') Send("{TAB}") Send("{DOWN 4}") Send("{ENTER}") . . . .
-
This is my code: Thank you for taking time to help .. very appreciative I am thinking it's having trouble reading the cell for the if then statement... before the method i ran a macro that copys one cell and special paste the value into other cell so when autoit looks into the cell for the value that is all it sees .. not the formula just the number to make it easier to work right.. but right now is not working.. --------------------------------------------------------------------------------------------- #include <Excel.au3> run ("C:\Program Files\Microsoft Office\Office12\EXCEL.exe") ;opens excel winwaitactive ("Microsoft Excel - Book1") sleep (900) Send("{CTRLDOWN}o{CTRLUP}") sleep (200) Send("C:\Gen\M.DBF; C:\tr\AS.DBF; C:\tr\Mpoop.DBF") ; Send("{ENTER}") ;opens and works good Send("{CTRLDOWN}o{CTRLUP}") Send("C:\C Files\FC.xls") Send("{ENTER}") Send("{CTRLDOWN}o{CTRLUP}") sleep (200) Send("C:\Documents and Settings\pr.xlsm") ;opens a works fine Send("{ENTER}") winwaitactive ("Microsoft Excel -pr.xlsm") Send("{ALTDOWN}{F8}{ALTUP}") Send("{TAB}") Send("{ENTER}") ; run macro m.r. Send("{ALTDOWN}{F8}{ALTUP}") Send("{TAB}") Sleep (200) Send("{DOWN 19}") ;run macro m.j. Send("{ENTER}") sleep (200) Send("{ALTDOWN}{F8}{ALTUP}") Send("{TAB}") Send("{DOWN 2}") ;run macro f.c.c. Send("{ENTER}") Sleep(2000) Send("{CTRLDOWN}g{CTRLUP}") ; calling excel macro hotkey to copy cell D 2 and special paste value of cell to cell DU, ;25 so that when you read the cell is can only look at the value instead of the formula sleep(200) ; works fine up to this point and then is messes up with the picture below (see attachment picture) deleting() Func deleting() Send("{CTRLDOWN}g{CTRLUP}") #include <Excel.au3> $oExcel = _ExcelBookOpen("C:\Documents and Settings\pr.xlsm") $val = _ExcelReadCell($oExcel, "D", "2") ; looks in cell to determine value for if then statement If $val = 1 then Send("{ALTDOWN}{F8}{ALTUP}") ; this runs a macro d.h. Send("{TAB}") Send("{DOWN}") Send("{ENTER}") ElseIf $val = 2 Then Send("{ALTDOWN}{F8}{ALTUP}") Send("{TAB}") Send("{DOWN 2}") Send("{ENTER}") ElseIf $val = 3 Then Send("{ALTDOWN}{F8}{ALTUP}") Send("{TAB}") Send("{DOWN 3}") Send("{ENTER}") EndIf EndFunc Send("{ALTDOWN}{F8}{ALTUP}") Send("{TAB}") ; another macro .. but it cant get this far because it messes up above Send("{ENTER}")
-
Hello Guys!! This is a portion of my code that is a method called 'copyt' and the cell I'm trying to receive info from is DU2.. I dont know how to much this error: "Missing separater character after keyword" goes on to say DU error.. Func copyt() Send("{CTRLDOWN}g{CTRLUP}") #include <Excel.au3> $oExcel = _ExcelBookOpen("C:\Documents and Settings\lecture.xlsm") $val = _ExcelReadCell($oExcel, DU, 2) blah blah.... .... im basing my code off of this outline::: #include <Excel.au3> $oExcel = _ExcelBookOpen("path") $val = _ExcelReadCell($oExcel, Row, Column) If $val = 1 then ;Stuff to do ElseIf $val = 2 Then ;Stuff to do ElseIf $val = 3 Then ;Stuff to do ElseIf $val = 4 Then ;Stuff to do EndIf
-
how would i make these 'down' simple to code?? is there such thing as down9 ?? Send("{LWINDOWN}{LWINUP}") Send("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}") Thanks
-
Hello Guys I know this can be done but I'm sure how to go about this in the right direction. I'm up to this point in excel.. and this is what I'm trying to do.. I want AutoIt to recognize cell DU30 (cell location doesnt matter this point (only one cell)) and depending on what number is in that cell (numbers 1 - 12) go on into saying 'if' 'then' statements example if #1 ==1 then do this key combo, if #2==2 then do this key combo.... else ... If someone can please help me with the outline of this code I would really love it! p.s. I have the latest version of AutoIt Thanks :]