Jump to content

AskThatDude

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by AskThatDude

  1. Is it possible to zip a file without including the current directory structure?
  2. Hey Torels, I'm not sure what I am doing to generate this error but I cannot seem to add files to zip files I have already created. I keep receiving an error message making reference to $on = $oApp.NameSpace($hZipFile).Items.Count I have read through this topic but still cannot find the solution. All paths are valid and the txt file does exist. Here is the code I'm using. CODE#include <Zip.au3> $ZipFile = "D:\Home\Test.zip" $ZipFile = _Zip_Create($ZipFile) _Zip_AddFile($ZipFile, "D:\Home\Test.txt") _Zip_Count($ZipFile)
  3. Here is a better example of the file I'm trying to process: CODE1REALLY COOL SERVICES FOR YOU A ABC -1234567890 SETDATE 07/16/08 PAGE 1 ABC -PRK163 CUSTOMER ACTIVITY RUNDATE 07/16/08 EDFES-0923435 RUNTIME 18:11:01 0 1200 SOME CRAZY STREET 123456 23000 BLUEBERRY RD. DETROITS 840 NY 481 0 CUSTOMERSS NUMBER TYPE DEBIT CREDIT FEES SW DATE TIME/ CARD INST/ SW TERM SEQ/ EXCEPTION/ REJECT CUSTOME #/ACCOUNT # LOC DATE TIME TERM INST LOCAL TERM LOC SEQ D2/E1/PA/C4 ------------------------------------------------------------------------------------------------------------------------------------ *** PREVIOUS SUSPENSE TOTALS CASH-IN .00 CASH-OUT .00 NET CASH .00 TOTAL DEBITS .00 TOTAL CREDITS .00 TOTAL MEMO .00 WITHDRAWALS .00- ENV DEPOSITS .00 TRANSFERS FROM .00- INQUIRIES .00 PAYMENTS FROM .00 PAYMENT ENCL .00 TRANSFERS TO .00 OTHER MEMO .00 .00 PAYMENTS TO .00 PURCHASE .00 CHECK DEPOSITS .00 CASH DEPOSITS .00 DEPOSIT CSHBK .00 CASHED CHECK .00 ------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------ *** PREVIOUS SUSPENSE COUNTS Basically anytime I see a line beginning with "1REALLY COOL SERVICES FOR YOU A" I want to start a new file. Is that possible? I'm having trouble understanding how to properly code that.
  4. No, I don't think so. Because the top line of each file as a page number so the search with not be accurate.
  5. Ok everyone I am trying to develop a script that reads a multi-page txt file that contains headers. The file is formatted as such: Some Company Cool Report Page 1 Batch: 2008 Employee Workload 4/21/2008 234234234234234234 Some Guy Working 20000008 245345345355453545 Some Girl Sleeping 59095093 What I want to do is read the txt file and split it up into numerous txt files. I found the scrip below which allows me to split the file into many txt files but is there a way to tell it to split based on a line? Meaning look at the top line of the file. This would be the start of each txt file. I can get it to work based on line count but this can very. Any ideas? Here is the code I am working with: CODE$lines_per_output_file = 55 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;generate a fake input file for this test $junk = "" For $i = 1 To 100 $junk = $junk & $i & @CRLF Next $file = FileOpen("test.txt", 2) FileWrite($file, $junk) FileClose($file) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;read and split file into an array $array_of_whole_file = StringSplit(FileRead("MYFILE.TXT"), @CRLF, 1) $filecnt = 1 $linecnt = 1 While 1 ;open a numbered output file FileOpen("test_" & $filecnt & ".txt", 2) ;write x number of lines to that file For $i = 1 To $lines_per_output_file FileWriteLine("test_" & $filecnt & ".txt", $array_of_whole_file[$linecnt]) $linecnt = $linecnt + 1 If $array_of_whole_file[0] = $linecnt Then FileClose("test_" & $filecnt & ".txt") Exit EndIf Next FileClose("test_" & $filecnt & ".txt") $filecnt = $filecnt + 1 WEnd
  6. Embedding PDF files. I found a script that allows me to launch a pdf file within an embedded version of IE on my GUI. In doing so I notice that I have no access to the content or menu buttons. It acts as though it becomes locked. My overall goal is to send text to this embed PDF but cannot do so seeing as the document is basically locked. Any suggestions? or is this even possible?
  7. I have developed a script for my company in which I have three tabs that contain IE embeds. Each loads a web form that is populated with data. My problem is once everything is loaded I can only edit the text within the text fields of the last tab embed. I do notice I still have control of the buttons on each embed tab but cannot edit the text. Any ideas as to why this may be?
  8. I am looking for a way to hide password input. For example instead of seeing "Password" entered as the user types you will see "********". I did find reference to the $ES_PASSWORD command and it worked well until I upgraded to the latest version of AutoIT. Does anyone know how I can accomplish this with the new AutoIT?
  9. I am using 3.2.10.0 The program does exist because if I just use Run("C:\Windows\Programs\testing.exe") it will work. I'm not sure what it's doing.
  10. Hi everyone, I am trying to pass a variable into the run command but it fails everytime. I have found other scripts in the forum that have the same feature but also fail. Was there a change made in the new AutoIT that no longer permits this? Here is an example. $Blue = "C:\Windows\Programs\testing.exe" Run($Blue) When I execute the script I get an error saying: Unable to find Run($Blue) Is there something I am missing? Thanks
×
×
  • Create New...