
jjj
Active Members-
Posts
40 -
Joined
-
Last visited
Everything posted by jjj
-
Thanks! (27) addepisode_v0.41.zip
-
Does anyone have a UDF for serial port i/o? What I want to do is set a pin to high or low, and read to see if a different pin is high or low, for use with simple relays. I am wondering about a udf because i have no idea how to program with dll calls. Any help would be appreciated!!!
-
i am trying to return the line shown below, which is in a text file along with hundreds of other lines of data: The Sopranos @ s06e12 @ Kaisha @[ 04-Jun-2006 ] using this search string: The Sopranos - Kaisha .mpg I know I can do this with string in string, but I want to use reg. expressions so i can add some fuzzy logic into it eventually. Note that there is a space bofre the line of text in the first line shown, but not in the second line, but there is a space after the episode name and before the ".mpg". Can anyone help me? EDIT: I figured out the regexp for this(i attached the code below), but it there a way to match case insensitive?, and how would i do it letter by letter or word by word? (so i can have it return a match if for example the search string was "the sopranos - the kaisha .mpg" (notice the "the" in the episode name, and the case of the whole string) here is my initial code: $filename = StringSplit("The Sopranos - Kaisha .mpg", " - ", 1) $showname = $filename[1] $episodename = $filename[2] $episodename = stringsplit($episodename, " .", 1) $episodename = $episodename[1] $listfile = fileopen("c:\program files\wget\test.txt", 0) While 1 $line = FileReadLine($listfile) If @error = -1 Then ExitLoop ;MsgBox(0,"",":"&$showname&":") ;MsgBox(0,"",":"&$episodename&":") ;MsgBox(0,"",$line) if StringRegExp($line, $showname) = 1 Then if StringRegExp($line, $episodename) = 1 Then ExitLoop EndIf EndIf Wend MsgBox(0,"",$line)
-
thanks, ive got it now.
-
Hello, I am trying to work with sqlite database, using this udf. I am trying to find a complete row in the database, using the data in one of the fields as a search term. I started by dumping the table to text, and then searching through the text file, but i am sure there is a better way. Can someone point me in the right direction?
-
ok, I'll explain the situation a bit. I run a pvr on my comuter, and it wakes itself up to record tv shows. I want to run an autoit script that updates the router to forward a port to the pvr computer whenever it wakes up from standby. I would rather that the script does not run all of the time, but only once when the coputer wakes up. Any more ideas?
-
Does anyone know if winXP has something built in that can run a program when the computer wakes up from standby? (just like it does for startup?) If not, is there a way to do this with Autoit? Thanks!
-
Ie Udf Help With Selecting Radio Buttons
jjj replied to jjj's topic in AutoIt General Help and Support
great! I've got it working now, thanks for all the help! -
Ie Udf Help With Selecting Radio Buttons
jjj replied to jjj's topic in AutoIt General Help and Support
ok, it worked perfectly, but I am confused as to why it worked. From the help file for _IEFormElementRadioSelect , the usage is: _IEFormElementRadioSelect ( $o_object, $s_string [, $f_select = 1 [, $s_mode = "byValue" [, $f_fireEvent = 1]]] ) your line is _IEFormElementRadioSelect($oForm, 0, "RouteSelect") what is "RouteSelect" doing in there? From the help file, it should be $f_select, am i right? Thanks for the help! -
I am having problem understanding the IE udf. What I am trying to do is select the first radio button on this page, (it is for my router) and then hit the "edit" button (type=submit). I cant get anything to work, so i think i am having problems understanding how to start. If anyone can help me get started, or send me a script that does something similar i would be able to figure it out. Thanks! #include <IE.au3> $oIE = _IECreateEmbedded () GUICreate("Embedded Web control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360) GUISetState() _IENavigate ($oIE, "http://192.168.0.1/pforward.htm") $collection = _IEFormElementGetCollection ( $oIE ) $firststate = _IEFormElementRadioSelect ( "routeselect", 7 , 1 , "byIndex" , 0 ) webpage source: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="description" content="MR814v3 2022"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META http-equiv="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> <meta HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT"> <title>Port Forwarding</title> <link rel="stylesheet" href="form.css"> <STYLE TYPE="text/javascript"> classes.num.all.fontFamily = "Courier"; classes.num.all.fontSize = "10pt"; </style> <script language="javascript" type="text/javascript" src="utility.js"></script> <script language="javascript" type="text/javascript"> <!-- hide script from old browsers function loadhelp(fname,anchname) { if ((loadhelp.arguments.length == 1 ) || (anchname == "" )) top.helpframe.location.href="h"+fname+".htm"; else top.helpframe.location.href="h"+fname+".htm#" + anchname; } function chgSel(index) { document.forms[0].select.value = index; return true; } function validIp() { var cf = document.forms[0]; if( (cf.SV_IP4.value=="0") || checkIP(cf.SV_IP1,cf.SV_IP2,cf.SV_IP3,cf.SV_IP4,254)) return alertR(msg_invalid_ip); return true; } //--> </script> </head> <body bgcolor="#ffffff" onload="loadhelp('forw');"> <form name="formname" method="POST" action="pforward.cgi"> <table border="0" cellpadding="0" cellspacing="3" width="100%"> <tr> <td colspan="2"><h1>Port Forwarding</h1></td> </tr> <tr> <!-- RULE --> <td colspan="2" background="liteblue.gif" height="12"> </td> </tr> <tr> <td width="45%" valign="top"><a href="java script:loadhelp('forw','setup')" tabindex="-1"><b>Service Name</b></a></td> <td width="65%"><a href="java script:loadhelp('forw','setup')" tabindex="-1"><b>Server IP Address</b></a></td> </tr> <tr> <td valign="top"> <select name="svs_gm" size="1" tabindex="1" onchange="this.form.submit()"><option>AIM</option><option>Age of Empire</option><option>FTP</option><option>HTTP</option><option>ICUII</option><option>IP_Phone</option><option>NetMeeting</option><option>News</option><option>PPTP</option><option>QuakeII/III</option><option>Real-Audio</option><option>Telnet</option></SELECT></td> <td nowrap><input type="text" name="SV_IP1" class="num" size="4" maxlength="3" value="192" onfocus="this.select();" tabindex="2">.<input type="text" name="SV_IP2" class="num" size="4" maxlength="3" value="168" onfocus="this.select();" tabindex="3">.<input type="text" name="SV_IP3" class="num" size="4" maxlength="3" value="0" onfocus="this.select();" tabindex="4">.<input type="text" name="SV_IP4" class="num" size="4" maxlength="3" value="" onfocus="this.select();" tabindex="5"> <input type="Submit" name="svAdd" value="Add" tabindex="6" onclick="return validIp();"></td> </tr> <tr> <!-- RULE --> <td colspan="2" background="liteblue.gif" height="12"> </td> </tr> <tr><td colspan="2"> <table border ="1" cellpadding ="0" cellspacing ="0" width="100%"> <tr> <td nowrap width="3%" align="center"><span class="thead"> </span></td> <td nowrap width="3%" align="center"><span class="thead">#</span></td> <td nowrap width="30%" align="center"><span class="thead">Service Name</span></td> <td nowrap width="12%" align="center"><span class="thead">Start Port</span></td> <td nowrap width="12%" align="center"><span class="thead">End Port</span></td> <td nowrap width="27%" align="center"><span class="thead">Server IP Address</span></td> </tr><tr><td nowrap align="center"><span class="thead"> <input type="RADIO" name="RouteSelect" checked value="0" onclick="chgSel(0);"></span></td><td nowrap align="center"><span class="thead">1</span></td><td nowrap align="center"><span class="ttext">SKYPE</span></td><td nowrap align="center"><span class="ttext">4999</span></td><td nowrap align="center"><span class="ttext">5000</span></td><td nowrap align="center"><span class="ttext">192.168.0.5</span></td></tr><tr><td nowrap align="center"><span class="thead"> <input type="RADIO" name="RouteSelect" value="1" onclick="chgSel(1);"></span></td><td nowrap align="center"><span class="thead">2</span></td><td nowrap align="center"><span class="ttext">AOL-IM</span></td><td nowrap align="center"><span class="ttext">7000</span></td><td nowrap align="center"><span class="ttext">7001</span></td><td nowrap align="center"><span class="ttext">192.168.0.5</span></td></tr></table> </td> </tr> <tr> <!-- RULE --> <td colspan="2" background="liteblue.gif" height="12"> </td> </tr> <tr><td colspan="2" align="center" height="35" valign="bottom"> <input type="Submit" name="Edit" value=" Edit Service " tabindex="8"> <input type="Submit" name="Delete" value="Delete Service" tabindex="9"> <BR><BR> <input type="Submit" name="Add" value="Add Custom Service" tabindex="7"> <input type="hidden" name="select" value="0"> </td></tr> </table> </form> </body> </html>
-
EDIT: I got it to work, sorry about the post!!! I am trying to put a colon in a string, but it keeps saying cannont parse string. I know there is a way to do this, but i cant find it in the help file: $filetime = $filetimearray[0] & "/" & $filetimearray[1] & "/" & $filetimearray[2] & " " & $filetimearray[3] & ":" & $filetimearray[4] & ":" & $filetimearray[5] I have tried to use asc("58") but that doesnt work either. Thanks in advance!
-
thanks! works perfectly...
-
can anyone help me set an array with all links on the page? I am trying to populate the array with this code: _IENavigate ($oIE, "http://www.comedycentral.com/sitewide/media_player/browseresults.jhtml?showId=934") $olinks = _IELinkGetCollection ( $oIE ) For $Link In $oLinks _ArrayAdd ( $links, $Link.href ) Next and then navigate to a selected link with this line: _IENavigate ($oIE, $link[$selection]) Thanks in advance!
-
Running From Network Drive Issues
jjj replied to hcstarck's topic in AutoIt General Help and Support
not to hijack this thread, but i have a question that is along the same lines: Is there any way to retieve the local path of a file from a networked computer? I want the local path: c:\folder\file.exe not the networked path: \\compuetername\folder\file.exe or the mapped path z:\folder\file.exe Thanks for any help!! -
inetget has caching on by default. If you have: inetget(http... , filename, 1) it will force the download every time.