Jump to content

Search the Community

Showing results for tags 'Source'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 5 results

  1. goodmorning; autoit team please their are any youtube search way working? because i was using the get source and split it to get the result but know it does not working any way. is the youtube disabled that? and is their any other simple way to do that? i tested all examples found in this post but also it don't work https://www.autoitscript.com/forum/topic/123945-youtube-search/ and here is the example that i use to and it don't work any more local $hSearchOpenHNDL, $hSearchConnect, $sSearchGet local $a_UrlsArray[1][5] local $b_ButtonsDisabled = false, $b_SearchBTNFocus = false, $b_SearchListFocus, $h_SearchFocusHND local $Return = "0" local $s_OpenStringY = "/feed/trending" local $ChannelUrl = "", $channelName = "" if Not ($a_YoutubeSearchArray[0][0] = 0) then GUICtrlSetData($searchInp, $s_youtubeSearchLastSearch) $s_OpenStringY = "/results?search_query=" & StringReplace(GUICtrlRead($searchInp), " ", "+") $a_UrlsArray = $a_YoutubeSearchArray for $i = 1 to $a_UrlsArray[0][0] _GUICtrlListBox_AddString($SearchList, $a_UrlsArray[$i][0] & $a_UrlsArray[$i][2] & $a_UrlsArray[$i][3]) next _GUICtrlListBox_SetCurSel($SearchList, $I_youtubeSearchLastIndex-1) GUICtrlSetState($SearchList, $GUI_focus) else if Ping("youtube.com", 1000) > 1 then $hSearchOpenHNDL = _WinHttpOpen('') if not (@Error) then $hSearchConnect = _WinHttpConnect($hSearchOpenHNDL, "youtube.com") if Not (@Error) then $sSearchGet = _WinHttpSimpleRequest($hSearchConnect, "get", $s_OpenStringY) if not (@Error) then local $a_strings = _StringBetween($sSearchGet, '<a href="/watch', "<ul") local $title = "" local $url = "" local $length = "" local $result = "" GUICtrlSetData($SearchList, "") ReDim $a_UrlsArray[1][5] for $i = 0 to UBound($a_strings)-1 $url = _StringBetween($a_strings[$i], "?", '"') if @error then ContinueLoop $url = "https://www.youtube.com/watch?" & $url[0] $title = _StringBetween($a_strings[$i], 'dir="', '</a>') if @error then ContinueLoop $title = $title[0] $title = StringRegExpReplace($title, '(.*\"\>)', "") if StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}', 0) = 1 then $length = StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}', 2) elseIf StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}', 0) = 1 then $length = StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}', 2) else $length = "" endIf if IsArray($length) then $length = ": (" & $length[0] & ")" else $length = "" endIf $ChannelUrl = stringRegexpReplace($a_strings[$i], '(^.*?<a.*?\"(\/user|\/channel))+', "$2") $channelName = stringRegexpReplace($ChannelUrl, '(.*?\".*?>)(.*</a>)+', "$2") $ChannelUrl = stringRegexpReplace($ChannelUrl, '(\".*)+', "") $channelName = stringRegexpReplace($channelName, '(</a>.*)+', "") $result &= $title & @crlf & $url & @crlf ReDim $a_UrlsArray[UBound($a_UrlsArray)+1][5] $a_UrlsArray[UBound($a_UrlsArray)-1][0] = $title $a_UrlsArray[UBound($a_UrlsArray)-1][1] = $url $a_UrlsArray[UBound($a_UrlsArray)-1][2] = $length if not ($channelName = "") then $a_UrlsArray[UBound($a_UrlsArray)-1][3] = ", (" & $channelName & ")" if not ($channelUrl = "") then $a_UrlsArray[UBound($a_UrlsArray)-1][4] = "https://www.youtube.com" & $channelUrl $a_UrlsArray[0][0] = UBound($a_UrlsArray)-1 _GUICtrlListBox_AddString($SearchList, $a_UrlsArray[UBound($a_UrlsArray)-1][0] & $length & $a_UrlsArray[UBound($a_UrlsArray)-1][3]) next endIf endIf endIf endIf endIf i hope any one can help me thanks in advance
  2. WARNING: I never tried this on a root directory, I should probably write a fix for that case. EX: There is no C:\..\ I don't know how many of these there are on this forum and I know Tidy is real nice for making backups. I have a few dislikes relying on the Tidy backup: 1 I'm not crazy about the backup folder it creates in project folder. 2. If no Tidy edits are performed script is not backed up on Tidy. I can't rely on that when I request a backup. 3. If I want to backup a select group of files without backing up the entire project folder, it is somewhat tedious to select each file and Tidy. Now this is just a very simple script that I felt I could use to simplify backing up my project. I'm not asking you to code it for me, but I welcome feedback. If you think you can make it better or know of something better please share. I know of Github it's overkill for me, I'm not comfortable, and I won't use it as much as I need to. So here it is: You place it in the source folder, open it in Scite. Change: Global $gBackup_dir_path = "..\Backup\" to wherever you want you backup folder Path to be. in the main() add some backup("file_name") calls remember to remove file extension. and it should make a new backup file for each backup("file_name") every time you run the script. Test it out make sure it's working and you're good to go. #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: myName Script Function: To copy files to a backup folder. #ce ---------------------------------------------------------------------------- #include <File.au3> Global $gBackup_dir_path = "..\Backup\" ; Todo ; Add notes, options notes in file name main() func main() ; File list remember to remove extentions from file_name ; or add file extention as second parameter backup("Map_Editor") backup("DW_Server") EndFunc Func backup($spFile_name, $spFile_ext = ".au3") Local $error = 0 Local $iFile_num = 0 ; Make source file path Local $sFile_path_source = $spFile_name & $spFile_ext Local $sFile_path_dest = "" ; Sample the contents of the backup directory before creating a file there Local $aFile = _FileListToArray($gBackup_dir_path, $spFile_name&"*"&$spFile_ext, $FLTA_FILES) $error = @error If $error = 0 Then $iFile_num = $aFile[0] EndIf out("Found: " & $iFile_num & " files named: " & $spFile_name) Do ; Incroment file_num to find available file_name $iFile_num += 1 ; Path to Write File Copy $sFile_path_dest = $gBackup_dir_path & $spFile_name & "_" & $iFile_num & $spFile_ext ; Refuse to Overwrite File If FileExists($sFile_path_dest) = 0 Then ExitLoop EndIf ; Am I right? Sleep(30) Until 0 ; Create the file FileCopy($sFile_path_source, $sFile_path_dest, $FC_CREATEPATH) $error = @error If $error Then out("FileCopy() error: " & $error) out("sFile_path_source: " & $sFile_path_source & " sFile_path_dest: " & $sFile_path_dest) EndFunc ;==>backup Func out($output = "", $user = 0);debug tool ConsoleWrite(@CRLF & $output);to console new line, value of $output EndFunc ;==>out Backup_Script.au3 The script isn't authorized to overwrite files, and tries to create the next number of file_name available. The 'p' in my variable names stands for parameter.
  3. Hi guys, * Sorry for my many questions, ------------------------------------------------ i use that and it's true and fine, Local $dData = InetRead("http://example.com/my.html",1) $my = BinaryToString(StringReplace($dData, "0A", "0D0A"), 4)now how can i add functions in "my.html" and autoit run that function, it's meant when ever "Read" data from website, use that serve as "Autoit Function", something like that : In "my.html" we have this : MsgBox (1,"This is from website","this is from website")In script we have this : #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) GuiSetState() Local $dData = InetRead("http://example.com/my.html",1) $my = BinaryToString(StringReplace($dData, "0A", "0D0A"), 4) ;this place is for MsgBox from "my.html" While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndThanks Alot,
  4. Hey everyone, I am working on a script for which I have a webpage saved. At the start of the program, the program loads the source code into a variable, removes all script and noscript, and then it must cut out a div called product (<div id="product">). The problem is that each time I try to write this function, I have problems detecting how many child divs it has nested in it. I have tried also writing a function that determines the amount of characters in the div, for trimming to the right of the div, but this has not worked. I dont wish to use an embedded browser for my program, I just want to work with the strings. Could anybody give me any pointers? Thanks. EDIT I have found the following forum post: The problem is though, that (as far as I am aware) it requires you to use the embedded browser or just use internet explorer, which will not help me as I just want to read the source code. I am aware that I can load the source into the browser and then hide the browser, but I would rather just "cut" the div out of the source. Thanks. SOLUTION Thanks to thanlankon. Please note that this also returns the div tags (opening and closing) for the specified div. It also removes the " character from either side of the ID name.
  5. A Quine is a program that can output it's own source without having direct access or user intervention. (This Means no reading of the script file, prompting for source input, packaging the source, or using inbuilt source references) A Quine is not necessarily malicious or self-duplicating, but rather an attempt at a theory. Definition of Quine Why torture ourselves making this this way? The reason is to [re]prove a concept of computing: that it is possible for a turing-complete language to output it's own source-code. (or optionally, output a program in another language that outputs the original source code; aka. a multiquine ) Here, are some AutoIt3 Quines: My Quines: One-line quines from my reply on Page 2: ConsoleWrite(StringReplace("ConsoleWrite(StringReplace(%s,'%'&'s',Chr(34)&%s&Chr(34)))",'%'&'s',Chr(34)&"ConsoleWrite(StringReplace(%s,'%'&'s',Chr(34)&%s&Chr(34)))"&Chr(34)))MsgBox(0,'',StringReplace("MsgBox(0,'',StringReplace(%s,'%'&'s',Chr(34)&%s&Chr(34)))",'%'&'s',Chr(34)&"MsgBox(0,'',StringReplace(%s,'%'&'s',Chr(34)&%s&Chr(34)))"&Chr(34)))Old 2-Line Quine: $x="$x=%srnMsgBox(0,'Quine Example',StringFormat($x,Chr(34)&$x&Chr(34)))" MsgBox(0,'Quine Example',StringFormat($x,Chr(34)&$x&Chr(34)))Skeleton/Customizable Quine (Page 2) Global $gsQuine eq("MsgBox(0,'program','first exec line')") eq("MsgBox(0,'program','second exec line')") Func eq($s) Execute($s) $gsQuine&=BinaryToString(0x22287165)&$s&BinaryToString(0x0A0D2922) EndFunc $x="Global $gsQuinern%sFunc eq($s)rnExecute($s)rn$gsQuine&=BinaryToString(0x22287165)&$s&BinaryToString(0x0A0D2922)rnEndFuncrn$x=%srnMsgBox(0,'Quine Example',StringFormat($x,$gsQuine,Chr(34)&$x&Chr(34)))" MsgBox(0,'Quine Example',StringFormat($x,$gsQuine,Chr(34)&$x&Chr(34))) Any Questions? Quines by Michel Claveau: $x="MsgBox(0,'Quine','$x='&chr(34)&$x&chr(34)&@CRLF&$x)" MsgBox(0,'Quine','$x='&chr(34)&$x&chr(34)&@CRLF&$x) $g=chr(34) $x="MsgBox(0,'Q','$g=chr(34)'&@CRLF&'$x='&$g&$x&$g&@CRLF&$x)" MsgBox(0,'Q','$g=chr(34)'&@CRLF&'$x='&$g&$x&$g&@CRLF&$x) Images of past quines: - - - And for my next magic trick - an AutoIt3 / PHP Polyglot (non-quine and all too simple) A Polyglot is a script that can perform the same actions in multiple languages without manipulation of the code. ;=- <?php ;/* ConsoleWrite(";=- Hello World -=;"); ;*/ ; echo "Hello World"; ; ?> -=;In either language, this outputs ";=- Hello World -=;" to the console.
×
×
  • Create New...