Jump to content

TeTube

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by TeTube

  1. Hello, i got a problem that i cant solve by my own. I want to create a .txt file in a dir i just created before. The .ini creation works for some reason. If I try to create the .txts in the same dir as my application, it works. ; ----------------------------------------------------------------------- ; Paths ; ----------------------------------------------------------------------- Global Enum $statusStarted = -1, $statusPaused, $statusJoined, $statusFound Global $logPath = "\logs" ; Log Path. Global $imgPath = "\img" ; Image Path. Global $settingsPath = "\settings" ; Ini Path. Global $pickitPath = "\pickit" ; Ini Path. ; ----------------------------------------------------------------------- ; Files ; ----------------------------------------------------------------------- Global $itemFile = "log\itemlog.txt" ; Item log file. Global $logFile = "log\log.txt" ; Action log file. GLobal $iniFile = "settings\settings.ini" ; Settings ini file. GLobal $imgFile = "img\Item.jpg" ; Item image file. GLobal $pickitFile = "pickit\pickit.ini" ; pickit ini. _setup() Func _setup() ; Creates \log , \settings , \img and \pickit dir. DirCreate(@ScriptDir & $logPath) DirCreate(@ScriptDir & $settingsPath) DirCreate(@ScriptDir & $imgPath) DirCreate(@ScriptDir & $pickitPath) MsgBox(0, "Dir", "created dirs") ; Creates log.txt FileOpen($logFile, 0) FileClose($logFile) MsgBox(0, "log.txt", "created log.txt") ; Creates itemlog.txt FileOpen($itemFile, 0) FileClose($itemFile) MsgBox(0, "itemlog.txt", "created itemlog.txt") ; Creates pickit.ini IniWrite($pickitFile, "Rings", "Attribut1", 0) IniWrite($pickitFile, "Rings", "Attribut2", 0) IniWrite($pickitFile, "Amulets", "Attribute1", 0) IniWrite($pickitFile, "Amulets", "Attribute2", 0) MsgBox(0, "ini", "created pickit ini") ; Creates settings.ini IniWrite($iniFile, "RunCount", "RUNS", 0) IniWrite($iniFile, "RunCount", "FOUND", 0) IniWrite($iniFile, "Settings", "FIRST_RUN", 1) IniWrite($iniFile, "Checksum", "TOWN_CHECKSUM", 0) IniWrite($iniFile, "Checksum", "START_CHECKSUM", 0) IniWrite($iniFile, "Checksum", "RESUME_CHECKSUM", 0) IniWrite($iniFile, "Checksum", "TRINKET_CHECKSUM", 0) MsgBox(0, "ini", "created settings ini") EndFunc Could you help?
  2. oh my god, thx for the advice °_°
  3. Here is the following code: ;- --------------------------------------------------------------------------- ;- @Function: _profileselect ;- @Discription: Selects the profiles. ;- Func _profileselect() ;- Traytip counter variable. Local $j = 0 TrayTip("Selection", "Started", 3) ;- Selects all usernames that are stored in aGlobal. For $eName In $aGlobal ;- Traytip counter $j += 1 ;- Selects userprofile n from the global array. _IENavigate($oIE, $sURL & "/user/" & $eName, 0) ;- Check if URL is actually properly loaded. If not after 3 secs, ;- continue with next user in the array. Local $i = 0 While Not StringInStr($eName, StringTrimLeft(_IEPropertyGet($oIE, "locationurl"), 25)) And $i < 100 Sleep(20) $i += 1 WEnd ;- Traytip output after 10 profiles have been selected. If Mod($j, 10) = 0 Then TrayTip("Selection", "Current selection: " & $j, 3) EndIf Next ;- Resets counter variables for multiple runs with different ages. Local $j = 0 Local $del = 0 TrayTip("Clearing Array:", "Started!", 3) ;- Cleans the global array. For $aEntry In $aGlobal _ArrayDelete($aGlobal, $aEntry) Next TrayTip("Clearing Array:", "Done!", 3) TrayTip("Selection:", "Done!", 3) EndFunc I get this error: C:\Users\TeTuBe\Documents\My Dropbox\Highskill\Außer Uni Projekte\_BotSection\Jappy Bot\profileselect1.au3 (294) : ==> Error parsing function call.: While Not StringInStr($eName, StringTrimLeft(_IEPropertyGet($oIE, While Not StringInStr($eName, StringTrimLeft(_IEPropertyGet($oIE^ ERROR If anyone has a clue what could be wrong, lemme know :=)
  4. Again, thanks I just parsed the HTML body directly into the SRE. In each Step, I add the extracted Data into a global array. After, it parsed all the data I wanted into a global array, this steps appears tto be correct (_ArrayDisplay showed me in the end a correct array) But now, the rest of my program doesnt work anymore (the parts which use the global array) xD? Could it be the parsed string via SRE changed?
  5. Thanks for the fast reply. Well, this is exactly what I was looking for. The strings gonna look like: "w 21 OmgItsMe spoagdnoisdg owegpsogaüpgüsgrjopwog päpgnwpejgpweg w 18 YeahItsme sigosgnsdpgnsogn afoknsog oafodsigosö oghs w 18 soPro " But actually I m no sure if I can just pass the whole string array from the stringsplit function into the StringRegExp? Like I have a working regular expression, but the data I parse isnt working? °_°
  6. Hello people, I wrote some AutoIT script to parse all Strings from a html page into an array. After this, I want to extract strings out of the big string array via StringRegExp. Code: $oIE is my internet explorer handle where to parse the data from $aBodyText is the array where all strings are parsed in. $aProfileNames is the array where the extracted strings should be stored in. While 1 $aBodyText = StringSplit(_IEBodyReadText($oIE), "", 1) If @error = 0 Then ExitLoop TrayTip("Error_Readnames:", "While doing StringSplit", 10) Sleep (10000) WEnd While 1 ;- String Pattern: "w (0-9)(0-9) Profilename" $aProfileNames = StringRegExp($aBodyText[2], " w \d\d (.*)", 3) If @error = 0 Then ExitLoop TrayTip("Error_Readnames:", "While doing StringRegExp", 10) Sleep (10000) WEnd Here is an example of the extracted html body: http://pastebin.com/UBTvpMac The data I would like to extract starts in 1822. and appears always as w DIGITDIGIT XXXXXXXXXXXXXXX Somehow, when I run this, I get an error in the regular expression part.
×
×
  • Create New...