Jump to content

n9mfk9

Active Members
  • Posts

    196
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

n9mfk9's Achievements

Prodigy

Prodigy (4/7)

0

Reputation

  1. Hi PsaltyDS, i jut went to go throw 9 files archive.php archives.php page.php search.php index.php header.php single.php attachment.php grab every thing from <!-- Begin wordpress code --> copy every between an end it here <!-- end wordpress code --> an then no changes write it out to the same file name just put it on anoter folder thanks for any help beau
  2. I am trying to write a script to read 8 files my question is how do make this i went to start here <!-- Begin wordpress code --> copy every between an end it here <!-- end wordpress code --> $file = FileOpen("metar2.txt", 0) $fileout = FileOpen("test.txt", 1) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop ;MsgBox(0, "Line read:", $line) ;$out= StringReplace($line, '","','"> ','1') ;MsgBox(0, "Line read:", $out) ;FileWriteLine($fileout,$out) Wend FileClose($file) FileClose($fileout) thanks for any help
  3. If i use this line autoit hangs ControlClick("[REGEXPTITLE:(?i).*?Outlook Express.*?]", " ", "Button1") what did i do wrong Beau
  4. autoit hangs beau
  5. Smooke_N what did i do wrong ControlClick("[REGEXPTITLE:(?i).*?Outlook Express.*?]", " ", "Button1") window info >>>> Window <<<< Title: Outlook Express Class: #32770 Position: 350, 251 Size: 443, 126 Style: 0x94C803C5 ExStyle: 0x00010101 Handle: 0x005105BA >>>> Control <<<< Class: Button Instance: 1 ClassnameNN: Button1 ID: 6 Text: &Yes Position: 140, 60 Size: 75, 23 ControlClick Coords: 51, 10 Style: 0x50030001 ExStyle: 0x00000004 Handle: 0x001905BC >>>> Mouse <<<< Position: 544, 350 Cursor ID: 2 Color: 0xF4F4F0 >>>> StatusBar <<<< >>>> Visible Text <<<< &Yes &No The spell check on this document was halted. Do you want to send anyway?
  6. that works were can i find info on REGEXPTITLE thanks Beau
  7. Hi all im trying to click the cancel on a outlook express spelling window i tried WinWaitActive("Spelling") ControlClick("Spelling", " ", "[CLASS:Button9; TEXT:Cancel") ControlClick("Spelling", "", "[CLASS:Button9; TEXT:Cancel; INSTANCE:1]") ControlClick("Spelling", "", "[CLASS:Button; TEXT:Cancel; INSTANCE:9]") ControlClick("Spelling", "", "[CLASS:Button9; TEXT:Cancel; INSTANCE:9]") none work here the window info >>>> Window <<<< Title: Spelling Class: #32770 Position: 312, 358 Size: 407, 212 Style: 0x94C800C4 ExStyle: 0x00010101 Handle: 0x00030736 >>>> Control <<<< Class: Button Instance: 9 ClassnameNN: Button9 ID: 2 Text: Cancel Position: 326, 153 Size: 66, 23 ControlClick Coords: 55, 5 Style: 0x50010000 ExStyle: 0x00000004 Handle: 0x000107B4 >>>> Mouse <<<< Position: 696, 545 Cursor ID: 2 Color: 0xFAFAF9 >>>> StatusBar <<<< >>>> Visible Text <<<< Not In Dictionar&y: kgkjkkjkjkjkkk Change &To: kgkjkkjkjkjkkk Suggestio&ns: &Ignore I&gnore All &Change Change A&ll &Add &Suggest &Options... &Undo Last Cancel thanks Beau
  8. Im using a program called yahoo pops so i can use localhostBeau
  9. Hi All, here my code #include <INet.au3> $s_SmtpServer = "localhost" $s_FromName = "n9mfk9" $s_FromAddress = "n9mfk9@yahoo.com" $s_ToAddress = "n9mfk@comcast.net" $s_Subject = "My Test UDF" Dim $as_Body[2] $as_Body[0] = "Testing the new email udf" $as_Body[1] = "Second Line" $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) $err = @error If $Response = 1 Then MsgBox(0, "Success!", "Mail sent") Else MsgBox(0, "Error!", "Mail failed with error code " & $err) EndIf im getting Mail failed with error code 50 how can i fixthis beau
  10. Hi everyone here my code #include <array.au3> #include<File.au3> $tagname ="" $ext =".txt" $sInput = "" ;$tagname = "" $FileIn = @ScriptDir & "\tagslist"&$ext $Fileout = @ScriptDir & "\mytest"&$ext ;$hFileOut = FileOpen($FileOut, 2) $sInput = FileRead($FileIn, FileGetSize($FileIn)) If @error = 1 Then MsgBox(0, "Error", "Unable to open file."&$FileIn) Exit EndIf ;MsgBox(0,"test", $FileIn) $avInput = StringSplit($sInput, @CRLF, 1) ;_ArrayDisplay($avInput, "$avInput") Global $avOutput[$avInput[0] + 1] = [$avInput[0]] For $n = 1 To $avInput[0] $sFormatted = "" $tag = StringRegExp($avInput[$n], "%.*?%", 1) If @error = 0 Then ;$tagname = $tag[0] Global $tagname[Ubound($tag)] $tagname[0] = $tag[0] $tagname[0] = StringReplace($tagname[0],'-','_') $tagname[0] = StringReplace($tagname[0],'<','LT') $tagname[0] = StringReplace($tagname[0],'>','GT') $tagname[0] = StringReplace($tagname[0],'=','') $tagname[0] = StringReplace($tagname[0],'/','_') $tagname[0] = StringReplace($tagname[0],',','CM') ;MsgBox(0,"",$tagname) ; ConsoleWrite("Debug: " & $n & ": " & $tag[0] & @LF) $sFormatted = "$" & StringReplace($tagname[0], "%", "") & ' = "' & $tag[0] & '" ' ;MsgBox(0,"",$sFormatted) ;ConsoleWrite("Debug: $sFormatted = " & $sFormatted & @LF) EndIf $avOutput[$n] = $sFormatted & "\\ " & StringRegExpReplace($avInput[$n], "\.{2,}", "", 0) ; ConsoleWrite("Debug: Output " & $n & ": " & $avOutput[$n] & @LF) Next Dim $avohdr $avohdr= _ArrayCreate("<?php" & @CRLF & "// converted"& $FileIn& "to"& $FileOut & "for php tags" & @CRLF & _ "// by " & "// Author: n9mfk" & @CRLF & "//// ---------------------------------" & @CRLF & _ "// allow viewing of generated source"&@CRLF&@CRLF&"if ( \$_REQUEST['sce'] == 'view' ) {" & @CRLF & _ " download('view');"& @CRLF & "exit;}"&@CRLF) _ArrayDisplay($avohdr, "$avOutput") $hFileOut = FileOpen($FileOut, 2) _FileWriteFromArray($hFileOut, $avohdr,0) _FileWriteFromArray($hFileOut, $avOutput,1) FileClose($hFileOut) ;MsgBox(0,"test", $avOutput) ;_ArrayDisplay($avOutput, "$avOutput") here the code i need help with Dim $avohdr $avohdr= _ArrayCreate("<?php" & @CRLF & "// converted"& $FileIn& "to"& $FileOut & "for php tags" & @CRLF & _ "// by " & "// Author: n9mfk" & @CRLF & "//// ---------------------------------" & @CRLF & _ "// allow viewing of generated source"&@CRLF&@CRLF&"if ( \$_REQUEST['sce'] == 'view' ) {" & @CRLF & _ " download('view');"& @CRLF & "exit;}"&@CRLF) _ArrayDisplay($avohdr, "$avOutput") $hFileOut = FileOpen($FileOut, 2) _FileWriteFromArray($hFileOut, $avohdr,0) when i look at my file the <?php is printed on lne 2 line 1 ins blank how can i move it to line 1 thanks Beau
  11. hi everyone, can an array be writen to a file with out using ubound thanks beau
  12. Thanks every one for the help
  13. Hi Everyone is there a better way to write a long string $eohdr= "<?php" &@CRLF &"// converted $infile to $outfile for php tags"&@CRLF&"// by "&"// Author: n9mfk"&@CRLF&"//"&"// --------------------------------------------------------------------------"&@CRLF&"// allow viewing of generated source"&@CRLF&@CRLF&"if ( \$_REQUEST['sce'] == 'view' ) {"&@CRLF & " download('view');"&@CRLF& "exit;"&"}" thanks Beau
  14. I got C:\Documents and Settings\beau thompson\My Documents\au3\test\weatherpage\mytagmaker4.au3 (25) : ==> Subscript used with non-Array variable.: $avField3[0] = $avField[0] $avField3^ ERROR ->14:38:31 AutoIT3.exe ended.rc:1 Beau
  15. no what im trying to do is make one array $avField1[0] in to $avfield3[0] so i tried $avField3[0] = $avField[0] but i did not work so my question is how to make an array in to a new array Thanks beau
×
×
  • Create New...