Jump to content

riqrat

Members
  • Posts

    4
  • Joined

  • Last visited

riqrat's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. This problem has me baffled. My script uploads GIF files to a directory on my server. There are currently 23 GIF files so I have 23 lines: After it successfully uploads the first 20 files, it fails to upload the 21st file, then after a brief pause, continues to successfully upload the final 2 files. It does not matter how I rearrange these lines. It isn't the file itself causing the problem, it has something to do with there being more than 20 files as it ALWAYS fails on the 21st file and I end up with a file with 0 bytes on my server for the 21st file. Any ideas what would cause this? **I've included SplashTextOn() before each _FtpPutFile line so I would be able to see where it was failing each time. SplashTextOn("FTP Transfer", "AUDUSD.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\AUDUSD.gif', '/public_html/wp-content/uploads/CEcharts/AUDUSD.gif') SplashTextOn("FTP Transfer", "GBPUSD.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\GBPUSD.gif', '/public_html/wp-content/uploads/CEcharts/GBPUSD.gif') SplashTextOn("FTP Transfer", "USDCAD.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\USDCAD.gif', '/public_html/wp-content/uploads/CEcharts/USDCAD.gif') SplashTextOn("FTP Transfer", "EURUSD.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\EURUSD.gif', '/public_html/wp-content/uploads/CEcharts/EURUSD.gif') SplashTextOn("FTP Transfer", "USDJPY.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\USDJPY.gif', '/public_html/wp-content/uploads/CEcharts/USDJPY.gif') SplashTextOn("FTP Transfer", "SP.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\SP.gif', '/public_html/wp-content/uploads/CEcharts/SP.gif') SplashTextOn("FTP Transfer", "US.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\US.gif', '/public_html/wp-content/uploads/CEcharts/US.gif') SplashTextOn("FTP Transfer", "W.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\W.gif', '/public_html/wp-content/uploads/CEcharts/W.gif') SplashTextOn("FTP Transfer", "AD.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\AD.gif', '/public_html/wp-content/uploads/CEcharts/AD.gif') SplashTextOn("FTP Transfer", "BP.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\BP.gif', '/public_html/wp-content/uploads/CEcharts/BP.gif') SplashTextOn("FTP Transfer", "C.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\C.gif', '/public_html/wp-content/uploads/CEcharts/C.gif') SplashTextOn("FTP Transfer", "CD.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\CD.gif', '/public_html/wp-content/uploads/CEcharts/CD.gif') SplashTextOn("FTP Transfer", "CL.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\CL.gif', '/public_html/wp-content/uploads/CEcharts/CL.gif') SplashTextOn("FTP Transfer", "CT.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\CT.gif', '/public_html/wp-content/uploads/CEcharts/CT.gif') SplashTextOn("FTP Transfer", "FN.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\FN.gif', '/public_html/wp-content/uploads/CEcharts/FN.gif') SplashTextOn("FTP Transfer", "GC.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\GC.gif', '/public_html/wp-content/uploads/CEcharts/GC.gif') SplashTextOn("FTP Transfer", "JY.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\JY.gif', '/public_html/wp-content/uploads/CEcharts/JY.gif') SplashTextOn("FTP Transfer", "KC.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\KC.gif', '/public_html/wp-content/uploads/CEcharts/KC.gif') SplashTextOn("FTP Transfer", "LC.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\LC.gif', '/public_html/wp-content/uploads/CEcharts/LC.gif') SplashTextOn("FTP Transfer", "LH.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\LH.gif', '/public_html/wp-content/uploads/CEcharts/LH.gif') SplashTextOn("FTP Transfer", "S.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\S.gif', '/public_html/wp-content/uploads/CEcharts/S.gif') FAILS HERE!!! SplashTextOn("FTP Transfer", "SB.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\SB.gif', '/public_html/wp-content/uploads/CEcharts/SB.gif') SplashTextOn("FTP Transfer", "SI.gif") $Ftpp = _FtpPutFile($Conn, 'C:\Users\Rick\Documents\GRAPHS\Cycle Envelopes\SI.gif', '/public_html/wp-content/uploads/CEcharts/SI.gif') In the example above, I end up with the file S.gif being only 0 bytes in size as it does not upload correctly. All the other files will upload correctly. But if I switch these lines around, for example, and say I make the FN.gif the 21st file, then it will be the file with 0 bytes having failed to upload correctly. Something is happening after 20 successful uploads and I just can't figure it out. Help? TIA
  2. I tried using one of the example scripts and it only works the first time I use it. Subsequent pressing of the Hotkey combination does nothing. Here is my script as is: #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here HotKeySet("{ESC}", "Terminate") HotKeySet("+z", "RunHurst") ;Shift-z While 1 Sleep(100) WEnd Func Terminate() Exit 0 EndFunc Func RunHurst() ShellExecute("G:\HURST\HURST.xltm","","","") EndFuncAfter I run this script, I can press Shift-Z and it will run my Excel file. After I'm done with the file and close it, but later press Shift-Z, nothing happens. Now, I'd rather just assign a Hotkey to run the script with just one line, the ShellExecute. But going into properties of the file does not have a Hotkey option so that is why I wrote the above. Any ideas? TIA
  3. The problem with trying to run the VBA code directly is that this code actually relies on the worksheet and tabs being at a particular focus because the VBA is running ALT-key commands. If an attempt to run the VBA directly is made, that would change the focus and the ALT-key commands would only cause a bunch of beeps rather than select something. For example, in a certain view (the Developer tab is selected and the focus is on the worksheet itself), sending an Alt-K might trigger a particular menu item or third-party button. But if one tries to run the VBA directly, that would require clicking on this and opening that first, which changes options available using the Alt-key codes, thus it won't work. This is why I need to click the ribbon button that triggers the VBA code directly, since the VBA code knows what to do from that particular focus view. The alternative would be a complete rewrite of the VBA and putting the Alt-key in control of AutoIT, but it is a third-part (protected) VBA code and I don't want to mess with it. I will try to find the IUIAutomation thread you mentioned. Thanks.
  4. Hello. Very new with AutoIT. Completed one nice FileZilla automated scripted and think this AutoIT stuff is pretty cool. But now I'm stuck with my next script. In my Excel 2010 app that is already open, I have to go through a bunch of sequences involving clicking on a button on the ribbon that runs some VBA code. The VBA code is 3rd party, so tinkering with it is out of the question. I started the Record Macro and then went to click on one of the ribbon buttons to see what kind of VBA code it would present me, but it turned out blank. How would I go about automating the clicking of a custom ribbon button in AutoIT? My script so far looks like this: #include <Excel.au3> ; Script Start - Add your code below here Local $oExcel = _Excel_Open() Local $oWorkbook = _Excel_BookOpen($oExcel, "C:\Users\Rick\Desktop\HURST.xltm")With the Hurst workbook open, there is a button on the ribbon under the Chart Tools[Designer] tab with the title RUN HURST. I usually click on this button to bring up an OPEN dialog in order to select a file to load. I'm stuck at the 'click on this button' part. TIA
×
×
  • Create New...