Search the Community

Showing results for tags 'help'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Chat
    • 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

Categories

  • Forum
  • AutoIt

Calendars

  • Community Calendar

Found 68 results

  1. Hello, Everyone! I want when clicking the exit button the window will close. If content changes upon exit the program will automatically choose not save. Look forward to the help, thanks. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <AutoItConstants.au3> $GUI = GUICreate("Form1", 220, 119, 192, 124, $WS_SYSMENU) GUISetFont(10, 400, 0, "Tahoma") GUICtrlCreateGroup("Chuẩn bị trình chiếu", 16, 16, 185, 65) $ok_Button = GUICtrlCreateButton("Ok", 32, 48, 75, 25) $exit_Button = GUICtrlCreateButton("Exit", 112, 48, 75, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $ok_Button ShellExecute(@MyDocumentsDir&'\Dich-thuat\Short-Document.pdf', "", "", Default, @SW_MAXIMIZE) WinWaitActive("Data and Computer Communications (Eighth Edition) - Google Chrome") ShellExecute(@MyDocumentsDir&'\Dich-thuat\Document.rtf', "", "", Default, @SW_MAXIMIZE) WinWaitActive("Document.rtf [Compatibility Mode] - Word") ShellExecute(@MyDocumentsDir&'\Dich-thuat\Presentation1.pptx', "", "", Default, @SW_MAXIMIZE) WinWaitActive("Presentation1.pptx - PowerPoint") MouseClick("left", 1381, 886, 1) Sleep(2000) MsgBox(64, "Thông báo", "Đã chuẩn bị xong") Case $exit_Button WinClose("Presentation1.pptx - PowerPoint") ;I need help handling this place Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
  2. Hey everyone, I've been messing around with some new things and adlibs look extremely useful/interesting, however, I can't seem to get it to work.. Here's what I have HotKeySet("{F1}", "_Exit") $qCount = 1 Global $_Timer AdlibRegister($_Timer, 1000) AdlibUnRegister($_Timer) While 1 SoundPlay(@WindowsDir & "\media\tada.wav", 1) $qCount += 1 ToolTip('"Tada" has been played ' & $qCount & " times",200,200) WEnd Func _Timer() Local Static $iCount += 1 ConsoleWrite($iCount) If $iCount = 20 Then ConsoleWrite("iCount is at " & $iCount) EndFunc Func _Exit() Exit EndFunc Basically I want it to call the _Timer function but it doesn't seem to work :/ any ideas?
  3. Try to find a solution for help files to my autoit executable. Its installed from simple XP-POS cash computers to desktop with windows 7, 8, 10. The compiled AutoIt program itself work everywhere, but the help file?? I need a help file called from from the program and I don't really know what working best in all OS platforms. 1. A wordfile is helpful enough, but word is not installed everywhere. 2. RTF is very big files with pictures. 3. I could save it as pdf, but not all have it either. 4. Tried .MHT file, but downside is browser could cover hole screen if browser closed this way. I have not found any way to resize it to specific size when open up. 5. Use of IE.au3 lib. Well it could open mht files ,but always got question about use it as default browser or not. Think this also make IE browser lose control so I could not resize. 6. Look at making a .CHM file, but I don't think its the future do use that format. (.hlp is no no and old) Any tips of do it in autoit or make a call to open up in some nice format working everywhere.
  4. Hellow everybody, I tryed to manipulate a game called "Assault Cube" which is a easy beginning in coding. I run the code but the wished value doesn't change, i don't understand why. The Pointers are fine, I checked that the pointers don't change every time while restart the game. My Code: <snip> _____________________________________________________________________________________________________________________________________________________________________________________________ Checklist: The Offsets are 18C & 4 In Cheat Engine: ("ac_client.exe"+0010F418) <- Pointer 4 Bytes = 'dword'
  5. Hi. I want to read the help file on my Kindle ebook reader (to protect my eyes). Is it available in Kindle or epub format? I tried converting it myself but the results were not very good. --Thanks!
  6. I need a random string generator which creates 15 letters/numbers. How can I make that?
  7. Hey anyone knows how i can have a inputbox that is connected to an HotKeySet? Like if u put in like "a" in the inputbox it sets the hotkey to "a"?
  8. Hello, I am trying to determine the size of attachments from .eml files. The scenario is that I have thousands of emails in .eml file type and need to determine the size of the attachment in some of the emails. I have already determined the number of emails in which there are attachments and the number of attachments per email. Also, emails without attachments. Can anyone shed some light on how i can go about this? BTW, the attachments are now hashed/coded? I don't know how you call it but its just a bunch of characters. File attached is a sample email. Regards, ivan sample.eml
  9. Hey there, I'm having some issues quick-sorting my 2d array imported from a database. Im trying to sort the array based on the name that would be returned in $array[$n][2]. The code i posted works for smaller arrays but for some reason when i try to sort my imported array (around 9000 indexes), I get "Recursion level has been exceeded". I understand that this is maybe due to lack of returns but i couldn't find an ideal spot to stick em and again it seems to work with smaller bits of code. Could it be that 9000 is too much? I would normally just trial and error it until i figured it out but due to the length of time to load and buffer my array it's become too time consuming. Really I'm just hoping there is a quick fix that someone with more experience happens to know. Thank you ;;---------------------------------------------This Works---------------------------------------------------- Local $a[7][2] = [ _ ["1", "asdfashks"], _ ["2", "SubStrlkghjing1"], _ ["3", "jdfghjsergh"], _ ["4", "nertynert"], _ ["5", "cvbncvjkrt"], _ ["6", "avbncvjkrt"], _ ["7", "oytuoyuop"]] Quicksort($a,1,0,6) _ArrayDisplay($a) ;;------------------------------------------This Does Not--------------------------------------------------------- Quicksort($aLargeData, 1, 0, Ubound($aLargeData) - 1) _ArrayDisplay($aLargeData) ;;----------------------------------------Quicksort Function------------------------------------------------------ Func Quicksort(ByRef $Array, $secondIndex, $First, $Last) Local $pivot, $i, $j, $temp If $First < $Last Then $pivot = $First $i = $First $j = $Last While ($i < $j) While (StringCompare($Array[$i][$secondIndex], $Array[$pivot][$secondIndex]) <= 0) And ($i < $Last) $i += 1 WEnd While (StringCompare($Array[$j][$secondIndex], $Array[$pivot][$secondIndex]) > 0) $j -= 1 WEnd If ($i < $j) Then _ArraySwap($Array, $i, $j) _ArraySwap($Array,$pivot,$j) Quicksort($Array, $secondIndex, $First,$j-1) Quicksort($Array, $secondIndex, $j+1,$Last) WEnd EndIf EndFunc
  10. I was wondering if its possible to make anything like this in AutoIT function toArr(str) { var ret = Array((str.length + 3) >> 2); // String to array of 32 bit ints for (var i = 0; i < str.length; i += 4) { // FYI: // NaN << x === 0 // x | NaN === x ret[i >> 2] = (str.charCodeAt(i ) << 24) | (str.charCodeAt(i+1) << 16) | (str.charCodeAt(i+2) << 8) | str.charCodeAt(i+3); } return ret; } function megaKdf(pw) { var pwkey = [0x93c467e3, 0x7db0c7a4, 0xd1be3f81, 0x0152cb56]; var arrPw = toArr(pw); var aes = Array((arrPw + 3) >> 2); // Init aes keys for (var i = 0; i < arrPw.length; i += 4) { aes[i >> 2] = new sjcl.cipher.aes([arrPw[i]|0, arrPw[i+1]|0, arrPw[i+2]|0, arrPw[i+3]|0]); } // Generate password key for (var i = 0; i < 65536; i++) { for (var j = 0; j < aes.length; j++) { pwkey = aes[j].encrypt(pwkey); } } return pwkey; } function loginHash(pwKey, email) { var aes = new sjcl.cipher.aes(pwKey); var arrEmail = toArr(email); var hash = [0, 0, 0, 0]; // Compress email with xor for (var i = 0; i < arrEmail.length; i++) { hash[i & 3] ^= arrEmail[i]; } // Generate hash for (var i = 0; i < 16384; i++) { hash = aes.encrypt(hash); } return sjcl.codec.base64.fromBits([hash[0], hash[2]], true, true); } function badRand32() { return Math.floor(0x100000000 * Math.random()); } function generateMasterKey() { return [badRand32(), badRand32(), badRand32(), badRand32()]; } function confirmationLinkHash(pwKey) { var aes = new sjcl.cipher.aes(pwKey); return aes.encrypt([badRand32(), 0, 0, badRand32()]); } function updateHashes(email, pw) { var pwKey = megaKdf(pw); var masterKey = generateMasterKey(); var clHash = confirmationLinkHash(pwKey, masterKey); var lHash = loginHash(pwKey, email); var aes = new sjcl.cipher.aes(pwKey); return lHash; } function htmlentities(str) { return str.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;"); } function analyzeLink(link, pw) { var linkHex = "N/A"; var masterKey = "N/A"; var encMasterKey = "N/A"; var pwHash = "N/A"; var unknown = "N/A"; var email = "N/A"; var spacer = "N/A"; var name = "N/A"; var unknown2 = "N/A"; if (link.substr(0, 27) == "https://mega.co.nz/#confirm") { link = link.substr(27); } if (link.substr(0, 19) == "mega.co.nz/#confirm") { link = link.substr(19); } if (link.substr(0, 8) == "#confirm") { link = link.substr(8); } if (link.search(/^[0-9A-Za-z\-_]*$/) == 0) { link = sjcl.codec.hex.fromBits(sjcl.codec.base64.toBits(link, true)); var pos; for (pos = 94; pos < link.length; pos += 2) { if (link.substr(pos, 2) == "09") { break; } } if (pos < link.length) { var pwKey = megaKdf(pw); var aes = new sjcl.cipher.aes(pwKey); var linkHash = aes.decrypt(sjcl.codec.hex.toBits(link.substr(32, 32))); if (linkHash[1] == 0 && linkHash[2] == 0) { masterKey = (new sjcl.cipher.aes(pwKey)).decrypt(sjcl.codec.hex.toBits(link.substr(0, 32))); masterKey = 'Base64: <span style="color:#f00; font-family:monospace;">' + sjcl.codec.base64.fromBits(masterKey, true, true) + '</span> (hex: <span style="color:#f00; font-family:monospace;">' + sjcl.codec.hex.fromBits(masterKey) + '</span>)'; } else if (pw != "") { masterKey = "Wrong password"; } encMasterKey = '<span style="color:#f00; font-family:monospace;">' + link.substr( 0, 32) + '</span>'; pwHash = '<span style="color:#080; font-family:monospace;">' + link.substr(32, 32) + '</span>'; unknown = '<span style="color:#00f; font-family:monospace;">' + link.substr(64, 30) + '</span>'; email = link.substr(94, pos - 94); spacer = '<span style="color:#0cc; font-family:monospace;">09</span>'; name = link.substr(pos + 2, link.length - 16 - pos - 2); unknown2 = '<span style="color:#000; font-family:monospace;">' + link.substr(link.length - 16) + '</span>'; linkHex = '<span style="font-family:monospace;">' + encMasterKey + " " + pwHash + " " + unknown + ' <span style="color:#888; font-family:monospace;">' + email + '</span> ' + spacer + ' <span style="color:#f0f; font-family:monospace;">' + name + '</span> ' + unknown2 + '</span>'; email = htmlentities(sjcl.codec.utf8String.fromBits(sjcl.codec.hex.toBits(email))) + ' (<span style="color:#888; font-family:monospace;">' + email + '</span>)'; name = htmlentities(sjcl.codec.utf8String.fromBits(sjcl.codec.hex.toBits(name))) + ' (<span style="color:#f0f; font-family:monospace;">' + name + '</span>)'; } } ge("linkHex").innerHTML = linkHex; ge("linkMasterKey").innerHTML = masterKey; ge("linkEncMasterKey").innerHTML = encMasterKey; ge("linkPwHash").innerHTML = pwHash; ge("linkUnknown").innerHTML = unknown; ge("linkEmail").innerHTML = email; ge("linkSpacer").innerHTML = spacer; ge("linkName").innerHTML = name; ge("linkUnknown2").innerHTML = unknown2; }
  11. Hi there, not sure if this is the right place, but I'm building a script for using premade answers in chat. It works and outputs the answers (stored in an ini file based on: answer name = answer it also works with a new line if there is a tag <enter> in the answer text in the ini file. Now the problem is, that after the answer is pasted in the chat (you bring up the interface with ctrl+1) it gives an enter, thus sending the output straight away. I would like to be able to review the answer before sending it. can anyone help me by telling what's wrong in the script, I tried replacing the @crlf in the script with other options, no luck. Thanks in advance! antwoorden.au3 antwoorden.ini
  12. After an update installation to Win 10 V.1607 (64bit) I have noticed that help does not show formatted properly anymore e.g. with Images missing, tables, headers, sample code mal formatted etc. However, if AutoIt3Help.exe is run as Administrator everything works fine. I have already uninstalled AutoIt and SciTE for AutoIt and reinstalled both in the latest version. I have used default locations for the installation under: C:\Program Files (x86)\AutoIt3\... Any idea? Thanks
  13. I need to find a way to after x amount of seconds set the Autoit gui's ComboBox to next option available, and if it reaches the end of the list start back at beginning. This way I can cycle through checking if users are connected to a network. The combo is populated via a recursive file search that contains folders with each connected user's username. The ComboBox will contain something like " username\config " for every connected user. So I need to make so it cycles through constantly every X seconds I have the gui functioning, and all that I just can't get this one part to work. TL:DR - How do I make so an AutoIt GUI ComboBox will cycle through all of its options every X seconds, and when it reaches bottom of options cycle back to top and continue the process again. Thanks! I can't post any code due to NDA sorry...
  14. I honestly didn't try anything yet. But i was thinking about my next step would be to try creating a tetris bot for educational purpose only. Last time i created a automation script / bot for ClubPenguin, which was simply made with PixelSearch If NOT(@error) Then , bla bla u know the drill aight, so i thought i would give my self a little harder challenge instead of keep making Pixelbots, i would love to try making a Memory bot or w/e u call , i read something about memory read/record was used for Tetris bots, since i haven't used Memory, i would love to know if anyone could give me a good guide or smth to follow :-) Either a complete tetris bot guide or a guide that explains memory totally in depth ish. :-) Dequality. #ANY-HELP-APPRECIATET
  15. Hey guys! I need your help again. So I am working on a Project with which I can Logoff a User in a Terminal-Server (Windows Server 2012 R2), logged in as Admin. Then backup the users partition and log him back in. Sounds pretty easy for you guys, right? So my problem is... I seem to not be able to get the User ID. You can see and display the ID in a textfile with: Run("query user>>c:\users\example\desktop\helpmeguys.txt") This line just writes a textfile of "query user" on the desktop. This is an example on what it looks like: BENUTZERNAME SITZUNGSNAME ID STATUS LEERLAUF ANMELDEZEIT >wg console 2 Aktiv 17 25.07.2016 08:19 What I need right now is the ID. Any Idea on how to read it off of the Textfile? Please give me examples because I am still a rookie! With kind regards Eddi96
  16. Version 1.2

    12,619 downloads

    I wrote an introductory text for new programmers to learn how to code using AutoIt. It follows along with the help file for the most part – but provides additional context and attempts to connect all the information in a cohesive way for someone without any programming experience. I find the help file to be an AMAZING resource and the text I wrote in no way reflects any opinion to the contrary. Rather, it was created from the perspective of someone who struggled early on with the most basic concepts and thought that a hand-holding guide could be useful. I was also inspired by code.org who is trying to encourage people to learn to code. I thought – what better way than to use free tools that you can download at any time with access to an amazing community? If only there was a guide to walk people through it … Full discussion about the file can be found here: https://www.autoitscript.com/forum/topic/174205-introductory-learn-to-program-text-using-au3/
  17. I can't seem to get this to work properly with the ksl classifieds website. It needs to select the second category for when you are posting an ad on the classifieds, however i can't seem to get it to select the second category, however it selects the first one just fine... "I can't post full code due to privacy nda issues..." I will answer any questions you have for any unclear parts as best as I can... Thanks! $tab = 0 $imUploadCount = 0 _IENavigate($ksl, "https://www.ksl.com/?nid=1126") _IELoadWait($ksl, 5) Sleep(10000) ;Set category! Local $cat = _IEGetObjById($ksl, 'cat') _IEFormElementOptionSelect($cat, $Category, 1, "byText") Sleep(10000) ;Set subcategory! Local $subcat = _IEGetObjById($ksl, 'subcat') _IEFormElementOptionSelect($subcat, $Subcategory, 1, "byText") Sleep(10000) ;Time to submit the form! Local $oIEButton_go = _IEGetObjById($ksl, 'go') _IEAction($oIEButton_go, 'click') _IELoadWait($ksl, 10) Sleep(5000) It reads the $Category & $Subcategory for a .ini file that a gui has configured based off of user selections... "drop down lists with available categories that I manually saved to a .ini" I have checked the spelling of the categories and they are all spelled correctly the categories I am testing with is FREE and FREE (items only, no businesses)
  18. Hi all, I am looking for a quick tip on why my autoit script crashes when I run a timer. Currently I have this code: ....(more code above this).... Case $button2 function1() Case $butTimer _Timer_setTimer($hGUI, 3200, "_timedout") ...... Func _timedout() Msgbox(0, "Timed out", "Time is up!") Endfunc When the button is pressed, my timer starts, correct? It doesnt seem to matter if I have it on button activation or not, after the time goes by for a bit, it crashes. Seemingly when the time is up, my script crashes. Thanks for your help!
  19. I added to my project in c# referenced the dll's : AutoitX3.Assembly.dll and AutoitX3Lib.dll In my code i'm trying to simulate a combination of Ctrl + O So I did: AutoIt.AutoItX.ControlSend(processTitle, "", processFileName, "^^{r}"); When using a break point: In processTitle I see: Game In the processFileName I see: C:\Program Files (x86)\Game\Game\Game.exe For checking I looked into Task Manager and there I see in the tab details: Game.exe as name and in Description I see Game And if I will click manually on my own Ctrl + O it will work it will do what I need it will take effect. But when using the AutoIt it will not work will do nothing no effect at all. And I see it's getting and doing the line with the ControlSend but nothing happen. And it did work few hours ago. What is wrong ?
  20. I keep getting error : Statement cannot be just an expression. Here are the 3 error variations it gives: Global $ImageCount += 1 ~~~~~~~~~~~~~~~~~~~~~^ Global $ImageCount += 1 ~~~~~~~~~~~~~~~~~~~~^ Global $ImageCount += ~~~~~~~~~~~~~~~~~~~^ Here is the code: Case $Image1 ;GUICtrlSetState($Image1, 4+128) GUICtrlSetState($Image2, 64) $Image1_done = 1 OpenImages() Global $Image1_added = $imagePath ;MsgBox("Info", "Image 1 Path", $Image1_added) OpenEditBox() Global $Image1_Description = $editBox_save If $im1 = 0 Then Global $ImageCount += 1 $im1 = 1 EndIf Case $Image2 If $Image1_done = 1 Then ;GUICtrlSetState($Image2, 4+128) GUICtrlSetState($Image3, 64) OpenImages() Global $Image2_added = $imagePath ;MsgBox("Info", "Image 2 Path", $Image2_added) OpenEditBox() Global $Image2_Description = $editBox_save $Image2_done = 1 If $im2 = 0 Then Global $ImageCount += 1 $im2 = 1 EndIf Else EndIf Case $Image3 If $Image2_done = 1 Then ;GUICtrlSetState($Image3, 4+128) GUICtrlSetState($Image4, 64) OpenImages() Global $Image3_added = $imagePath ;MsgBox("Info", "Image 3 Path", $Image3_added) OpenEditBox() Global $Image3_Description = $editBox_save $Image3_done = 1 If $im3 = 0 Then Global $ImageCount += 1 $im3 = 1 EndIf Else EndIf Case $Image4 If $Image3_done = 1 Then ;GUICtrlSetState($Image4, 4+128) GUICtrlSetState($Image5, 64) OpenImages() Global $Image4_added = $imagePath ;MsgBox("Info", "Image 4 Path", $Image4_added) OpenEditBox() Global $Image4_Description = $editBox_save $Image4_done = 1 If $im4 = 0 Then Global $ImageCount += 1 $im4 = 1 EndIf Else EndIf Case $Image5 If $Image4_done = 1 Then ;GUICtrlSetState($Image5, 4+128) GUICtrlSetState($Image6, 64) OpenImages() Global $Image5_added = $imagePath ;MsgBox("Info", "Image 5 Path", $Image5_added) OpenEditBox() Global $Image5_Description = $editBox_save $Image5_done = 1 If $im5 = 0 Then Global $ImageCount += 1 $im5 = 1 EndIf Else EndIf Case $Image6 If $Image1_done = 1 Then ;GUICtrlSetState($Image6, 4+128) OpenImages() Global $Image6_added = $imagePath ;MsgBox("Info", "Image 6 Path", $Image6_added) OpenEditBox() Global $Image6_Description = $editBox_save If $im6 = 0 Then Global $ImageCount += 1 $im6 = 1 EndIf Else EndIf
  21. I am trying to get my code to be loopable based off of a variable count for example number of images selected variable is named $imgCount = 6 (meaning there were 6 images selected) I need to know if this will work assuming all images paths are stored in the gui created... $image1 $image2 $image3 $image4 $image5 $image6 That would be the variable names that would equal the gui for guictrlread .... $ImUploadCount = 0 $imageCounter = 6 ; has been set by incrementing every time an image was picked via gui button 1-6 we will assume it equals 6 Func Upload() Do $imUpload = $ImUploadCount + 1 _IEFormElementSetValue($browsefield, GUICtrlRead($Image & $imUpload)) Until $imageCounter = $imUpload So Essentially will $Image & $imUpload provide $image1, $image2, $image3, etc... when it sets the value then uploads? or will that cause a problem...? "is there a better way to do this?
  22. How would I get this code to work? If not possible/If there is a better way... How would I do it? I can't seem to get it to work properly... Func Go() ;Do stuff Re-Go() EndFunc Func Re-Go() Go() EndFunc
  23. Hi all, I'm looking for some help to finish my last bit of code. So far my code scrapes an XML from a webpage and then sends and email on a trigger but what i need to do is find a way to see if a string is in the XML. example Global $Site = IniRead("settings.ini", "Site", "web", "") ;============================================================ while 1 if @HOUR >= 05 and @HOUR <= 18 then $sXML = BinaryToString(InetRead($Site)) $Day = StringRegExpReplace($sXML, '(?is).*<availability.*?day="([^"]+).*</availability.*', '$1') $4WD = StringRegExpReplace($sXML, '(?is).*?<members.*? name="4WD Operations".*?day="([^"]+).*</members.*', '$1') $ARS = StringRegExpReplace($sXML, '(?is).*?<members.*? name="Advance Rescue Shorting".*?day="([^"]+).*</members.*', '$1') $ART = StringRegExpReplace($sXML, '(?is).*?<members.*? name="Advanced Rescue Tools Equipment".*?day="([^"]+).*</members.*', '$1') $ASO = StringRegExpReplace($sXML, '(?is).*?<members.*? name="Air Search Observer".*?day="([^"]+).*</members.*', '$1') check("Day Crew", $day) check("4WD Operations",$4WD) check("Advance Rescue Shorting",$ARS) check("Advanced Rescue Tools Equipment",$ART) check("Air Search Observer",$ASO) sleep(3000000) ; Sleep for 50 mins cause the extra 10 mins is outside of the if EndIf WEnd func check($Class, $ScrapeValue) $Num = IniRead("settings.ini", "Numbers", $class, "") if $Num == 0 Then EndIf if $ScrapeValue < $Num then box($class, $ScrapeValue, $Num) EndFunc func box ($class, $ScrapeValue, $Num) MsgBox(6,"test", $class & $ScrapeValue &$Num ) EndFunc So right now if I open the settings.ini and made day = 2 and the XML site has day as 1 the message box shows message. (great) But if <members.*? name="4WD Operations".*?day="([^"]+).*</members is not in the XML is shows the whole XML. So i need a way to do a if $class not in $sXML skip else keep running script Global $Site = IniRead("settings.ini", "Site", "web", "") ;============================================================ while 1 if @HOUR >= 05 and @HOUR <= 18 then $sXML = BinaryToString(InetRead($Site)) $Day = StringRegExpReplace($sXML, '(?is).*<availability.*?day="([^"]+).*</availability.*', '$1') $4WD = StringRegExpReplace($sXML, '(?is).*?<members.*? name="4WD Operations".*?day="([^"]+).*</members.*', '$1') $ARS = StringRegExpReplace($sXML, '(?is).*?<members.*? name="Advance Rescue Shorting".*?day="([^"]+).*</members.*', '$1') $ART = StringRegExpReplace($sXML, '(?is).*?<members.*? name="Advanced Rescue Tools Equipment".*?day="([^"]+).*</members.*', '$1') $ASO = StringRegExpReplace($sXML, '(?is).*?<members.*? name="Air Search Observer".*?day="([^"]+).*</members.*', '$1') check("Day Crew", $day) check("4WD Operations",$4WD) check("Advance Rescue Shorting",$ARS) check("Advanced Rescue Tools Equipment",$ART) check("Air Search Observer",$ASO) sleep(3000000) ; Sleep for 50 mins cause the extra 10 mins is outside of the if EndIf WEnd func check($Class, $ScrapeValue) $Num = IniRead("settings.ini", "Numbers", $class, "") if $Num == 0 Then EndIf if $Class Not In $sXML ; At this point I need to see if the Class is in the XML if its not skip EndIf ElseIf $ScrapeValue < $Num then box($class, $ScrapeValue, $Num) EndFunc func box ($class, $ScrapeValue, $Num) MsgBox(6,"test", $class & $ScrapeValue &$Num ) EndFunc any ideas ?
  24. I have a script visiting a website of mine and I want it to change to a new proxy each run with an array(I think I got that covered and it should be working) but if this proxy is dead it gives me an error in AutoIT(Not so strange), but I want it to skip the proxy if its dead and go on the the next. I use $oHTTP.SetProxy(2, "proxy:port") everything works except for if proxy is dead or none responding etc.
  25. Hey, So I'm trying to create a translation script to translate text from english to spanish. It seems my program crashes if i have more than 1 child in the html.(i will highlight it via comment) I am also occasionally crashing after my 5 second, while busy, loop. Any help or insight would be greatly appreciated. $langFrom = "en" $langTo = "es" While 1 Sleep(250) Translate() Wend Func Translate() $ie = ObjCreate("InternetExplorer.Application") $ie.visible = True $toTrans = InputBox("Translate", "Enter text to translate [" & $langTo & "]") $ie.Navigate("https://translate.google.ca/?ie=UTF-8&hl=" & $langFrom & "&client=tw-ob#auto/" & $langTo & "/" & $toTrans) $result = "" While($ie.busy) Sleep(5000) WEnd ;occasionally crashing here (unsure cause) While($result = "") $result = $ie.document.getElementById("result_box").innerHTML sleep(250) WEnd $children = $ie.document.getElementById("result_box").childNodes ;suspect i did something wrong here $result = "" for $child in $children $result = $result & $child.innerHTML & " " ;crashing here Next ;cleanup $result = StringReplace($result," "," ") $result = StringReplace($result," ."," ") $ie.quit() MsgBox(0,"Translated", $result) EndFunc