Jump to content

jrmm

Members
  • Posts

    17
  • Joined

  • Last visited

About jrmm

  • Birthday 06/12/1973

Profile Information

  • Location
    Clarksville Indiana
  • WWW
    http://www.geocities.com/jrmm
  • Interests
    AutoIt 3.x, AutoIt GUI, VB 6, VB .NET, .BAT

jrmm's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. @jdelaney Thanks again.... I found the issue. The first file wasn't really tab delimited as I thought... It was using a bunch of spaces instead of tabs. I modified the section where the first split happens to look like below and now it rolling along smoothly.... ; split up the array For $i = 0 To UBound($aFile1)-1 $aFile1[$i] = StringReplace($aFile1[$i],":","") ;Takes colons out of MAC address to match format of other file. do $aFile1[$i] = StringReplace($aFile1[$i]," "," ") ;Replaces multiple spaces with a single space Local $iReplacements = @extended until $iReplacements = 0 $aFile1[$i] = StringReplace($aFile1[$i]," ",",") ;Replaces single space with coma $aFile1[$i] = StringSplit($aFile1[$i],",",2) ;Split CSV NextThe script is working well. Thank you so much. I definitely learned some new tricks and sure appreciate the help. - John
  2. Thanks so much for the suggestions. I am very grateful for the help with this. @jdelaney, I like your first example and think it will do the trick. You do things in the code I have never done, so I will have to dig into this tonight or over the weekend. Running the first example as is, I get this error... (25) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: If $aTemp[1] = $aTemp2[4] Then If ^ ERROR Pointing the script to the files I get the same error..... I'll have to wrap my heard around this better after work. - John
  3. I love Autoit, but struggling to find the best way to do this. I have 2 text files.... File1 is Tab Separated and File2 is CSV. I am attempting to read in a line from File1 and split it, then search the contents of File2 for one of the substrings from that split line. If I find a match, then I want to split the matching line and grab needed info from it to complete the record and output the combined record to a file. Example line from File1: 17 123456789 learned 10800 bridging 1/13 Example line from File2: 172.25.17.103,computername.domain,Reservation (active),DHCP,123456789,,Full Access,N/A From File1, I grab the 2nd column (MAC Address) and search for that in the 2nd file (Column5) I really thought reading file into an array and doing an _arraysearch was the way to go, but that seems to require searching for the whole string, not a sub-string. What I have been trying to do so far is read in file1 one line at a time, split the string, then read in file 2 one line at a time and check for a matching substring..... handle that. Then back to file 1 to repeat the process. This seems so clunky. So I would love suggestions on what functions might work best. Thanks so much for any feedback. - John
  4. Hello, We have used the code below at work to set default printers and it seems to work great. Our boss is asking if this writes to the registry. Outside of using a process monitor to watch the registry I can't think of any way to determine for sure. I'm guessing that it does indirectly. Is anyone familiar with this function or have suggestions on where I should start? Thanks for any help, John Func _WinAPI_SetDefaultPrinter($sPrinter) Local $aResult = DllCall("winspool.drv", "bool", "SetDefaultPrinterW", "wstr", $sPrinter) If @error Then Return SetError(@error, @extended, False) Return $aResult[0] EndFunc
  5. Your Install app is really awesome. Thanks for sharing.
  6. I'm including the GUI script. It's not complete yet, but the ping portion of it is what we are having trouble at this point. The purpose of this script is to go through printers in the printers folder and check to see if they are online.... the change the comments for the printer. You are welcome to look at this script, but don't put a big importance on it. It's just something I'm trying to figure out. I comented out the Start / Resume button's functions because it sends commands to your PC and I didn't want to mess something up. John
  7. Gosh.... thank you so much for the offer. Let me clean the script up a bit so it is more understandable. I'll get back with you.
  8. I'm not sure I could pull it off. Thanks so much for the ideas. I'm fairly new to AutoIt, but love it.
  9. Thanks for the ideas. I'll try it.
  10. Thanks so much for the idea and very good point. I have to try it out. John
  11. Thanks so much for the idea. I was using Autoit 3.1.1. After running v3.1.1.106 (beta) things seem to work the way I would like. Thank you, Thank you, Thank you.
  12. Thanks for the response. When I increase the timeout, I get the same results. Autoit is just counting the (fail) response from the network switch thinking the device is online when it is not.
  13. Thanks for the response. Yes, I check the @error and if the network switch responds that the IP address is unreachable, then the @error = 0 (online), when the device is actually OFFLINE.
  14. Hello...... I am trying to use the ping function in autoit to determine if a networked device is online or not. If the ping times out without a response, the results are predictable, but if the network switch responds and tells me the destination is unreachable, then autoit seems to use that response as a successful ping. In the example below, the first ping that timed out, autoit sees as offline, but the responses from the switch (Reply from 172.25.11.254: Destination host unreachable.) show as online. Any ideas??? Thanks so much for any help, John Ping Example from DOS..... ping 172.25.28.117 Pinging 172.25.28.117 with 32 bytes of data: Request timed out. Reply from 172.25.11.254: Destination host unreachable. Reply from 172.25.11.254: Destination host unreachable. Reply from 172.25.11.254: Destination host unreachable. Ping statistics for 172.25.28.117: Packets: Sent = 4, Received = 3, Lost = 1 (25% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
  15. Thanks so much for the reads and responses. I ended up using the INFILE / OUTFILE idea submitted. It works GREAT!!! Thanks sooo much! I love the way the GUI app is turning out. ~ John
×
×
  • Create New...