Jump to content

SoW

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by SoW

  1. Thanks for the help, now I need to figure out what to use.
  2. I am not at home at the moment, so I do not have the code, but I am wondering what variable type or what to write as the variable code or something for a variable that is going to hold a lot of text (maybe 200+?). It will also haev special characters such as hyphens (-) and percent signs (%). I was using FileReadLine and stored it as a variable and showed it in my GUI List like GUICtrlCreateListViewitem() <-- using that -- But it dislpays the line, and cuts off so I have to drag the bar over to the right. Except, when I start dragging the bar, it does not show more of the text, it just makes the text disappear! Help!
  3. I read, but it looks like the same that I have done, just with a .ini file. I don't understand why if I type something like: "Hoz - 200% ed - Rabbit-Uniques" minus the double-quotes, it shows up as Hoz - 200... then when I move the bar so I can see the full word, it just disappears.
  4. Received. You said something about Ini (I would assume that would use IniRead() and IniWrite()). Can somebody explain using Inis to store data please?
  5. Well, I PM'd Volly but I suppose I have to post my code here. I know it's bad, but it's my first day using AutoIt. #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.2.0 Author: Michael "Sor" Fratello Script Function: Don't even ask. #ce ---------------------------------------------------------------------------- #include <GUIConstants.au3> #include <string.au3> #include <File.au3> Opt("GUIOnEventMode", 1) $main = GUICreate("Diablo II Mule Tracker - Sor", 500, 450) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") $MainMenu = GUICtrlCreateMenu("Main") GUICtrlCreateMenuitem("View Items", $MainMenu) GUICtrlSetOnEvent(-1, "showItems") GUICtrlCreateMenuitem("Remove Items", $MainMenu) GUICtrlSetOnEvent(-1, "removeItem") GUICtrlCreateMenuitem("Exit", $MainMenu) GUICtrlSetOnEvent(-1, "CLOSEClicked") $Help = GUICtrlCreateMenu("Help") GUICtrlCreateMenuitem("About", $Help) GUICtrlSetOnEvent(-2, "about") GUICtrlCreateMenuitem("Help", $Help) GUICtrlSetOnEvent(-2, "help") GUICtrlCreateMenuitem("Version - 1.5", $Help) GUICtrlCreatePic("C:\Documents and Settings\Mike\Desktop\myautoits\scripts\logo.jpg", 30, 10, 423, 219) GUICtrlCreateLabel("Mule Item: ", 30, 245) Dim $input, $subInput, $Help, $MainMenu, $main $input = GUICtrlCreateInput("", 85, 240, 100, 25) $subInput = GUICtrlCreateButton("Mule!", 235, 240, 60, 30) GUICtrlSetOnEvent($subInput, "mule") GUISetState(@SW_SHOW) While 1 sleep(1000) WEnd Func showItems() $x = GUICtrlCreateListView("Items Muled", 0, 280, 500, 200) $file = FileOpen("items.txt", 0) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf Dim $i $i = 0 ;MsgBox(0, "Debug", _FileCountLines("C:\Documents and Settings\Mike\Desktop\myautoits\scripts\items.txt")) While ($i <= _FileCountLines("C:\Documents and Settings\Mike\Desktop\myautoits\scripts\items.txt")) $line = FileReadLine($file) If @error = 1 Then ExitLoop GUICtrlCreateListViewitem($line, $x) $i = $i + 1 WEnd FileClose($file) EndFunc Func help() GUICtrlCreateLabel("[= HELP =]", 30, 320, 500) GUICtrlCreateLabel("For help, you can e-mail your questions to", 30, 500) GUICtrlCreateLabel("mike.helljumper@gmail.com", 30, 340, 500) EndFunc Func about() GUICtrlCreateLabel("Created By (c) 2007 Michael Fratello", 30, 320, 200) GUICtrlSetBkColor(-1, "0x00ff00") EndFunc Func mule() $data = GUICtrlRead($input) $writeFile = FileOpen("items.txt", 1) If $writeFile = -1 Then MsgBox(0, "Error", "Unable to open file!") Exit EndIf FileWriteLine($writeFile, $data) FileClose($writeFile) MsgBox(0, "Item Added", "Item added to muled list successfully!") EndFunc Func removeItem() MsgBox(0, "Hard Hat Zone", "That is currently * UNDER CONSTRUCTION *") EndFunc Func CLOSEClicked() Exit EndFunc
  6. I have a script that writes to a file, and also gets each line from a file. The lines are pretty long sometimes, and sometimes contain spaces, % signs, -, ~, etc; many special characters. I'm using the GUICtrlCreateListViewitem() to list each line, and it was working good, but I notice that some of the longer lines showed until the divider, but when I drag the divider to see the full line, it just DISAPPEARS. Any idea why? $line = FileReadLine($file) is what I am using. I think I need to make it seem like a character or something, but how would I do that?
  7. Sorry about that. The problem was that it could not find the file, and you were right, I forgot to include that. Thank you.
  8. I get an error when I use the _FileCountLines() function. It is in the help file, etc, so I don't understand why I am getting the error! Part of the code is: $countLines = _FileCountLines($file) $file is defined as FileOpen('C:\dir\to\txt\file', 0) Any idea why it isn't working?
  9. UPDATE! I fixed the problem, hehe. Noticed that I had to: #include <string.au3> and use GUICtrlRead() Thanks for all the help guys.
  10. Thanks for the help, bro. Check my other topic, I need some more GUI help, hehe.
  11. Okay. Anyways, I have another GUI problem, hehe. I have an input box $input = GUICtrlCreateInput("", 75, 240, 100, 25) And whenever I hit the button (it submits and has an OnEvent like it should), I have: MsgBox(0, "Submission", "You have submitted: " & $input & "!") But every time the message box has it as "You have submitted: 5!" I don't understand why?
  12. Eh, I get your hint, but it isn't for cheating. It's for calculating experience % to next level, hehe. But I got it.
  13. This is my first time using GUI, so yes I am a noob. I was trying to play with the menu, but it doesn't show in the GUI window! Also, in the help file, the "Open Script" button does not work, so if somebody could give me the script shown in there, I would be very grateful. Hehe. Here is my code, I don't know why the menus do not show! #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) $main = GUICreate("Test GUI", 500, 450) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") GUICtrlCreateMenu("Main", 1) GUICtrlCreateMenuitem("Haxorz", 1) GUICtrlCreateMenu("Alternate", 2) GUICtrlCreateMenuitem("2 Hax!!", 2) GUICtrlCreateMenu("Final", 3) GUICtrlCreateMenuitem("OMGZOR HAX!!", 3) GUISetState(@SW_SHOW) While 1 sleep(1000) WEnd Func hax() MsgBox(0, "You Did It!", "You Haxxed!") EndFunc Func CLOSEClicked() MsgBox(0, "Close Request", "Closing....") Exit EndFunc
  14. What I want to do is get data from my game that is running using memory (it looks like 0x10180180) or something, I'm trying to find out how I would go about finding what the 0x00000000 number would be. Or if I would be able to autoit packetsend / receive.
  15. Thank you for the quick response. Now, is there any way to find out how to get what memory I should look for for what I want to do? :\
  16. I was just wondering if there was a program or something that told you what the coordinates of the mouse cursor are at any given time. If not, you just guess and check? Also, I was just wondering... _ReadProcessMemory is autoit, correct? I am wondering how I would find out what to put as the address; I am trying to use it with the game Diablo 2, and I was wondering how to figure out the address. Thanks.
  17. Okay, in Diablo 2, if you press "C" it opens up your character screen. It shows the stats of your character including Experience, etc. (Level: xx Current Experience: xxxxxxxxxx Needed Experience: xxxxxxxxxxxxx) I want to read these three from the menu in the game Diablo 2. So, I am wondering if I would be able to use AutoIt to read the level / experience from the game, and store them into variables, so I could divide to get experience %, etcetera. Would this be possible? If so, how would it be done?
×
×
  • Create New...