Jump to content

cloud920

Members
  • Posts

    10
  • Joined

  • Last visited

cloud920's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. thanks for your reply. as i said, i am new to AUTOIT and i am not very aware of where i should put it, so i put it before my script. but things not very smooth when i test it, is it something wrong where i put it?
  2. thanks Water for your advice. 1 more question, is there a function that like 'On error resume next' in AUTOIT? I have search out the help information but nothing found.
  3. how stupid i ammmmmmmmmmmmmmmmmmmmmmmmmmmmmmm, thanks Water for your attention for such a minor mistake bother me for a whole weekend!!!!!!!!!!!!!!!!!!!! appreciate! BTW, can you please advise where i could mapping those mistake with error?
  4. 111.bmp 111.bmpcan you see it? thanks Water not sure you can see it, let me type. my script is _Excel_RangeWrite($oWorkbook1,'shee1',ClipGet(),$oTargetRange) MsgBox(0, "RangeWrite", "@error = " & @error & ", @extended = " & @extended)
  5. thanks for your prompt help Water, no idea what is the Time @ your timezone, mine is 8pm, GMT+8 Let me answer your question. 1. I have some VBA experience, so when i wanna a loop, then i will use cells() instead of range() because cells can accept variables better than range() [i guesse] and if i use below script, it works very well. so i guess cells works good, targetrange will be filled with 'AUTOIT IS GOOD' i tested it _Excel_RangeWrite($oWorkbook1,'shee1','AUTOIT IS GOOD',$oTargetRange);'TEXT' just for example purpose2. for the error check, i surely new to AUTOIT and program mystery, so i still green hand.
  6. thanks for reply. below are the whole code. #include <excel.au3> WinActivate('Gii (3.8.0.42) - KUN_XIANG - AGIIP_BU_CN - 374 - China - \\Remote');active ERP Sleep(2000) Send('+{F8}');ERP internal hotkey, change page to Order detail page Sleep(1000) Send('{F2}');ERP internal hotkey, ask me if i search for a specific order# WinWait('Gii - \\Remote');when press F2, this window show up Send('{ENTER}');yes - i search for a specific order# WinWait('Order Search - \\Remote');Order search window show up WinActivate('Order Search - \\Remote') MouseClick('primary',533,374,1,0);choose one type of the order#, i could not use ID to choose because Finder could not detect anything MouseClick('primary',614,517,1,0);then activate the input window ;################################Open the Excel file where stores the order# and copy cells('2','W'),order Number######################## Local $oExcel=_Excel_Open() Local $oWorkbook1 = _Excel_BookOpen($oExcel, @ScriptDir & '\CQ_FY16Q3_W10.xlsm',False) Local $oRange = $oWorkbook1.worksheets('sheet1').cells(2,'w') Local $oTargetRange = $oWorkbook1.worksheets('sheet1').cells(2,'BY') _Excel_RangeCopyPaste($oWorkbook1.worksheets('sheet1'), $oRange) ;TargetRange will be used to store the later data which copied form the ERP. I just try to do it once, when it works, it would be a loop that happens more than 300,000 times ;because i have more than 300,000 order row in excel every Q, currently it's a manual work, 3 months later maybe IT could do it for us, but we need it very urgently ;some times we have to do it the whole team##### Sleep(2000) WinActivate('Order Search - \\Remote') Send('^v');paste the copied order# to ERP input box, works Send('{ENTER}');then search WinWait('Order Details - \\Remote') sleep(2000) Send('{ENTER}');some details show up, no useful, click enter to pass WinWait('List Price / Cost Changes - \\Remote') Send('{ENTER}');same as above Sleep(10000) Opt('mousecoordmode',0) WinActivate('Gii (3.8.0.42) - KUN_XIANG - AGIIP_BU_CN - 374 - China - \\Remote') MouseClick('primary',1199,433);click the detail of order, because Finder tool can not detect anything, i have to use the XY to click it WinWait('Internet Explorer - \\Remote');details show up, first the window, then some details, so sleep 5secs Sleep(5000) MouseClick('primary',194,253,2,0);where i need to copy Send('^c');copy Sleep(2000) WinActivate('CQ_FY16Q3_W10.xlsm');activate EXCEL $oTargetRange.Select;select target ragne, 'BY2' Send('^v'); CTRL V, does not work.... _Excel_RangeWrite($oWorkbook1,'shee1',ClipGet(),$oTargetRange);does not work either....help!!!!!!!!!!!!!
  7. Thanks...any chance that give me some advice? The ERP is written by Critix, so nothing can be detected by Finder tool, currently, i could MsgBox what i copied, but just can not paste it to a assigned excel range. WHY i am trying to tell you that EXCEL is not activate because, i tried to send F2 to excel, which means 'edit' in excel, and try '^v', but it shows me a window from the ERP, which apparently i just press the hotkey of the ERP instead of EXCEL...
  8. Thanks Logan, appreicate your reply. below are my trying - _Excel_RangeWrite($oWorkbook1,'shee1',ClipGet(),$oTargetRange)still does not work, i assume that winactivate does not work very well, is there any other method to bring the EXCEL file to the FRONT of the screen? because when i tried winactiavte my Excel file, it's still in background, not in front of the screen, thanks again.
  9. hi there, i am new to AUTOIT, and this tool is amazing good! I am writing a script to copy some text from an internal ERP, which is written by Critix. it's about to copy some numbers, and text from some pumped up windows to EXCEL. Everything works fine until below, WinWait('Internet Explorer - \\Remote') Sleep(5000) MouseClick('primary',194,253,2,0) Send('^c') ;this works Sleep(2000) WinActivate('CQ_FY16Q3_W10.xlsm') $oTargetRange.Select Send('^v') ; this does not work at all, I've tried a lot of other method...But if i manually press ctrl+v button, it works.... so please help me, thanks in adv
×
×
  • Create New...