Jump to content

Humper

Active Members
  • Posts

    44
  • Joined

  • Last visited

Everything posted by Humper

  1. Okey I still havn't got any anwser to the original question I asked. That as the only thing I wondered. Offtopic: For the U3 drive I don't use the original crap payload. So please keep it to the topic Thanks!
  2. Thanks for the suggestion but it still didn't really awnser my question. So now I got 3 questions instead: - Why wouldn't it work to have spotify on a U3 drive? - How else could I have it portable and easy to access, quick and fast? - What is the command for ROOT at the script diraction
  3. Hello, Im making a script for spotify (spotify.com/). This script will: - Creating a gui (if not settings.ini found) and request for login and password settings. - Creating settings.ini - Launch spotify - Login using the settings.ini - Wait until spotify is closed and then remove the cache folder that spotify makes This is what I currently got: ControlSend("Spotify", "", "SP52ABF01", "^+{RIGHT}") ControlSend("Spotify", "", "SP52ABF01", "{DEL}") ControlSend("Spotify", "", "SP52ABF02", "^+{RIGHT}") ControlSend("Spotify", "", "SP52ABF02", "{DEL}") ControlSend("Spotify", "", "SP52ABF01", "Accountname") ControlSend("Spotify", "", "SP52ABF02", "Password") ControlSend("Spotify", "", "SP52ABF02", "{ENTER}") Okey I got no problem with almost all. I would like to know, what is the code for ROOT in the drive that script is used. Because the script will be in a totaly other place with random numeric code. So I need to do: @root/documents/spotify/settings.ini @root/documents/spotify/spotify.exe I can't place a letter because the drive will recive different letters at different computers. Thanks in advance! Regards, Humper
  4. Yes I will, thanks for all the help. I've learned alot to make these scripts. I can still only make basic scripts but I will try advance abit next time I make somthing.
  5. Acually I study the helpfile all the time. But if I got no idea even what the commands name is then how could I write the hole script? Ofc you guys shouldn't write all my script, thats not what im looking for. I learned alot on only making this script. This is only the second serious script I made for autoit so I got some strugles. If you don't know what I've been doing then you shouldn't judge either. Thats not a nice attitude and wont help you anywhere. Regards, Humper
  6. Still don't really getting it Title is: Mozilla Firefox Text is: Pixel color and keypresses - autoit forums or do I get this wrong?
  7. I just have to ask one thing: Whats the difference?
  8. Ow, thats pro ^^ Could you explain what you did here. Got this part Here its starting to be abit wierd, whats the [9][2], and why local? And why is the first one 0, 0 is that if the value is 0? Whats $x? And why For and to command? And the Mouseclick a partly get but if you explain it also, it would be good.
  9. Here is the complite script. Works great, I will advance it later when I got more time and make it based on connection instead of time. ;Pre info $argument = " -w -nohide -ns" $Account = IniRead("Settings.ini", "Account", "Account", "Default") $Password = IniRead("Settings.ini", "Account", "Password", "Default") $Nr_Characters = IniRead("Settings.ini", "Account", "Nr_Characters", "Default") $Path = IniRead("Settings.ini", "Path", "Diablo II path", "Default") If FileExists ( "settings.ini" ) Then Diablo () Else ;SCRIPT GUI, CREATE INI #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("TrayMenuMode", 1) Global $Ini_Path = @ScriptDir & "\Settings.ini" #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Diablo settings", 387, 294, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_GROUP, $WS_BORDER, $WS_CLIPSIBLINGS, $DS_CONTEXTHELP)) GUISetCursor(14) GUISetBkColor(0xA6CAF0) $Diablo_Path = GUICtrlCreateInput("Diablo_Path", 48, 40, 297, 21) $Account = GUICtrlCreateInput("Diablo_Account", 48, 96, 297, 21) $Password = GUICtrlCreateInput("Diablo_Password", 48, 152, 297, 21) $Nr_Characters = GUICtrlCreateInput("Nr_Characters", 48, 208, 297, 21) $Browse = GUICtrlCreateButton("Find File", 280, 14, 70, 20) $Write = GUICtrlCreateLabel("Write your diablo path (including diablo.exe):", 48, 16, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("Write accountname:", 48, 72, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("Write password:", 48, 128, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("Number of characters:", 48, 184, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("All information will only be stored local.", 104, 275, 209, 17) GUICtrlSetCursor(-1, 14) $Button1 = GUICtrlCreateButton("Continue", 134, 252, 121, 17, 0) GUICtrlSetCursor(-1, 4) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Browse $find_loc = FileOpenDialog("Find Diablo_Path", @ProgramFilesDir, "EXE files (Diablo II.exe)", 3) If Not @error Then GUICtrlSetData($Diablo_Path, $find_loc) Case $Button1 IniWrite($Ini_Path, "Path", "Diablo II path", GUICtrlRead($Diablo_Path)) IniWrite($Ini_Path, "Account", "Account", GUICtrlRead($Account)) IniWrite($Ini_Path, "Account", "Password", GUICtrlRead($Password)) IniWrite($Ini_Path, "Account", "Nr_Characters", GUICtrlRead($Nr_Characters)) GUIDelete($Form2) Run ( "traytip.exe", @ScriptDir ) Run ( "d2charchecker.exe", @ScriptDir ) Exit ; Guictrlread(All of the Inputs); one at a time ; iniwrite() the info you just read ; GUIDELETE($Form2) ; exit the loop and run the main GUI EndSwitch WEnd ;Script gui end EndIf Func Diablo () Run($Path & $argument) WinWaitActive("Diablo II") WinMove ( "Diablo II", "", 0, 0 ) Sleep (500) ;Enter to get to main screen Send ("{ENTER}") ;Bnet MouseClick ( "left", 420, 372 ) ;Mark the login name Sleep (4000) MouseClick ( "left", 474, 358, 2) Send ($Account, 1) Send ("{TAB}") Sleep (1200) Send ($Password, 1) Sleep (1200) Send ("{ENTER}") Sleep (3500) ;Login complite EndFunc $readusrspot = IniRead("Settings.ini", "Account", "Nr_Characters", "Default") if $readusrspot = 1 Then achar () Else if $readusrspot = 2 Then achar () bchar () Else if $readusrspot = 3 Then achar () bchar () cchar () Else if $readusrspot = 4 Then achar () bchar () cchar () dchar () Else if $readusrspot = 5 Then achar () bchar () cchar () dchar () echar () Else if $readusrspot = 6 Then achar () bchar () cchar () dchar () echar () fchar () Else if $readusrspot = 7 Then achar () bchar () cchar () dchar () echar () fchar () gchar () Else if $readusrspot = 8 Then achar () bchar () cchar () dchar () echar () fchar () gchar () hchar () Else if $readusrspot < 8 Then;more than 8 msgbox(1,"Error","Invalid character amount, change it at settings.ini") WinClose("Diablo II") Else if $readusrspot > 1 Then;0 msgbox(1,"Error","Invalid character amount, change it at settings.ini") WinClose("Diablo II") Endif Endif EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf Func achar () MouseClick("left",211,174,1,1) joingame () EndFunc Func bchar () MouseClick("left",415,164,1,1) joingame () EndFunc Func cchar () MouseClick("left",229,257,1,1) joingame () EndFunc Func dchar () MouseClick("left",415,253,1,1) joingame () EndFunc Func echar () MouseClick("left",177,341,1,1) joingame () EndFunc Func fchar () MouseClick("left",408,341,1,1) joingame () EndFunc Func gchar () MouseClick("left",161,427,1,1) joingame () EndFunc Func hchar () MouseClick("left",438,431,1,1) joingame () EndFunc Func joingame () Sleep (400) Send ("{ENTER}") Sleep (4000) ;Press join game MouseClick ( "left", 709, 484 ) Sleep (4000) ;Double click on game MouseClick ( "left", 504, 251, 2 ) ;How long to wait in game Sleep (300000) Send ( "{ESC}" ) Sleep (200) Send ( "{UP}" ) Sleep (200) Send ( "{ENTER}" ) Sleep (2500) Send ( "{ESC}" ) Sleep (3000) EndFunc I don't know the BB code to get the code to autoit code.
  10. Thanks, works great. Could you explain what the command "global" does? And what really changed in the script you made. Now you specify more clairly where settings.ini should be written. I would like some minor more changes tho. When enter key is pressed then it should have the same effect as pressing the continue button.
  11. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("TrayMenuMode", 1) #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Diablo settings", 387, 294, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_GROUP, $WS_BORDER, $WS_CLIPSIBLINGS, $DS_CONTEXTHELP)) GUISetCursor(14) GUISetBkColor(0xA6CAF0) $Diablo_Path = GUICtrlCreateInput("Diablo_Path", 48, 40, 297, 21) $Account = GUICtrlCreateInput("Diablo_Account", 48, 96, 297, 21) $Password = GUICtrlCreateInput("Diablo_Password", 48, 152, 297, 21) $Nr_Characters = GUICtrlCreateInput("Nr_Characters", 48, 208, 297, 21) $Browse = GUICtrlCreateButton("Find File", 280, 14, 70, 20) $Write = GUICtrlCreateLabel("Write your diablo path (including diablo.exe):", 48, 16, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("Write accountname:", 48, 72, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("Write password:", 48, 128, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("Number of characters:", 48, 184, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("All information will only be stored local.", 104, 275, 209, 17) GUICtrlSetCursor(-1, 14) $Button1 = GUICtrlCreateButton("Continue", 134, 252, 121, 17, 0) GUICtrlSetCursor(-1, 4) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Browse $find_loc = FileOpenDialog("Find Diablo_Path", @ProgramFilesDir, "EXE files (*.exe)", 3) If NOT @Error Then GUICtrlSetData($Diablo_Path, $find_loc) Case $Button1 iniwrite ( "Settings.ini", "Path", "Diablo II path", GuiCtrlRead( $Diablo_Path ) ) iniwrite ( "Settings.ini", "Account", "Account", GuiCtrlRead( $Account ) ) iniwrite ( "Settings.ini", "Account", "Password", GuiCtrlRead( $Password ) ) iniwrite ( "Settings.ini", "Account", "Nr_Characters", GuiCtrlRead( $Nr_Characters ) ) GUIDelete ($Form2) ExitLoop ; Guictrlread(All of the Inputs); one at a time ; iniwrite() the info you just read ; GUIDELETE($Form2) ; exit the loop and run the main GUI EndSwitch WEnd
  12. Could be my computer bugging but it happens like this: Working method: Without pressing on "findfile" and instead writing it in manual. And then pressing continue it works great, it creates the .ini and write and then closes. Not working method: Pressing "findfile" and finding diablo.exe then press okey. It comes up in the writingbar. But when I press continue it just closes without creating or editing the .ini file. Regards, Humper
  13. Doesn't seem to work for me somehow. I might could just remove the button to prevent this. If no one knows whats wrong.
  14. Great, first version didn't work but second did when I added a space you forgot. @ the 3th, I don't really want to use that one because I don't understand it and then i don't really learn anything. Oh, I thought I needed to use ".exe" but i could use it without the ". Okey look, here is the code I inport: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("TrayMenuMode", 1) #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Diablo settings", 387, 414, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_GROUP, $WS_BORDER, $WS_CLIPSIBLINGS, $DS_CONTEXTHELP)) GUISetCursor(14) GUISetBkColor(0xA6CAF0) $Diablo_Path = GUICtrlCreateInput("Diablo_Path", 48, 40, 297, 21) $Browse = GUICtrlCreateButton("Find File", 280, 16, 70, 20) $Write = GUICtrlCreateLabel("Write your diablo path (including diablo.exe)", 48, 16, 209, 17) GUICtrlSetCursor(-1, 14) $Button1 = GUICtrlCreateButton("Continue", 144, 372, 121, 17, 0) GUICtrlSetCursor(-1, 4) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Browse $find_loc = FileOpenDialog("Find Diablo_Path", @ProgramFilesDir, "EXE (Diablo II.exe)") GUICtrlSetData($Diablo_Path, $find_loc) Case $Button1 GUICtrlRead ( $Diablo_Path ) iniwrite ( "Settings.ini", "Path", "Diablo II path", GuiCtrlRead( $Diablo_Path ) ) ; Guictrlread(All of the Inputs); one at a time ; iniwrite() the info you just read ; GUIDELETE($Form2) ; exit the loop and run the main GUI EndSwitch WEnd Here is the code I get when I press convert at koda: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Diablo settings", 364, 388, 299, 244) GUISetCursor (14) GUISetBkColor(0xA6CAF0) $Diablo_Path = GUICtrlCreateInput("Diablo_Path", 48, 40, 297, 21) $Browse = GUICtrlCreateButton("Find File", 280, 16, 70, 20, 0) $Write = GUICtrlCreateLabel("Write your diablo", 48, 16, 209, 17) GUICtrlSetCursor (-1, 14) $Button1 = GUICtrlCreateButton("Continue", 144, 372, 121, 17) GUICtrlSetCursor (-1, 4) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I pressed nothing else then import and then convert it back. Now when I understand how I do it manual I could do it that way also but it would be good if I could use the koda designer. EDIT: Okey I got the code partly working. But when I press "find file" button it stops working. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("TrayMenuMode", 1) #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Diablo settings", 387, 294, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_GROUP, $WS_BORDER, $WS_CLIPSIBLINGS, $DS_CONTEXTHELP)) GUISetCursor(14) GUISetBkColor(0xA6CAF0) $Diablo_Path = GUICtrlCreateInput("Diablo_Path", 48, 40, 297, 21) $Account = GUICtrlCreateInput("Diablo_Account", 48, 96, 297, 21) $Password = GUICtrlCreateInput("Diablo_Password", 48, 152, 297, 21) $Nr_Characters = GUICtrlCreateInput("Nr_Characters", 48, 208, 297, 21) $Browse = GUICtrlCreateButton("Find File", 280, 14, 70, 20) $Write = GUICtrlCreateLabel("Write your diablo path (including diablo.exe):", 48, 16, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("Write accountname:", 48, 72, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("Write password:", 48, 128, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("Number of characters:", 48, 184, 209, 17) GUICtrlSetCursor(-1, 14) $Write = GUICtrlCreateLabel("All information will only be stored local.", 104, 275, 209, 17) GUICtrlSetCursor(-1, 14) $Button1 = GUICtrlCreateButton("Continue", 134, 252, 121, 17, 0) GUICtrlSetCursor(-1, 4) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Browse $find_loc = FileOpenDialog("Find Diablo_Path", @ProgramFilesDir, "EXE (Diablo II.exe)") GUICtrlSetData($Diablo_Path, $find_loc) Case $Button1 GUICtrlRead ( $Diablo_Path ) iniwrite ( "Settings.ini", "Path", "Diablo II path", GuiCtrlRead( $Diablo_Path ) ) GUICtrlRead ( $Account ) iniwrite ( "Settings.ini", "Account", "Account", GuiCtrlRead( $Account ) ) GUICtrlRead ( $Diablo_Path ) iniwrite ( "Settings.ini", "Account", "Password", GuiCtrlRead( $Password ) ) GUICtrlRead ( $Diablo_Path ) iniwrite ( "Settings.ini", "Account", "Nr_Characters", GuiCtrlRead( $Nr_Characters ) ) ; Guictrlread(All of the Inputs); one at a time ; iniwrite() the info you just read ; GUIDELETE($Form2) ; exit the loop and run the main GUI EndSwitch WEnd I know whats wrong but not how to fix it. Because when I press on the find file, it stops there and would need to go back to almost the beginning of the code or somthing.
  15. Yes, I use that. But the this is that, it doesn't even work to just: - Import script to koda - Convert to autoit That doesn't even work. Okey back to coding only for a moment for me. But I got some problem there also. Case $Button1 GUICtrlRead ( $Diablo_Path ) iniwrite ( "Settings.ini", "Path", "Diablo II path", "value??" ) ; Guictrlread(All of the Inputs); one at a time ; iniwrite() the info you just read ; GUIDELETE($Form2) ; exit the loop and run the main GUI What value should I put in, GuiCtrlRead? How do I fix the "" before and after the path when writing? Or should I put the "" in the run script instead? Regards, Humper
  16. Hmm, howcome it doesn't work to use that script then make changes and then save it or run it? Does it work to edit it when it is a autoit file? I can view it but It doesn't work when I try it after I edited again.
  17. Do you need to code it in autoit? Otherwise redvex is an great gateway program that you can use. you could google for more info if you want. Most/best diablo 2 bots are made with autoit to login and create games and redvex to control the character+pickup etc.
  18. Yes, login + character enter random game on every character. Thanks great. Now I know how to use: if else func FileReadLine But I need still some help. Also is it possible for the program to create an window that asks for all the info and creates a settings.ini file First it asks for path, so then it create the file settings.ini (in the same folder as script) and write: [Path] Diablo II path="*What he/she wrote*" And more but I just need to know one to make more. This is turning out better then I thought it would, I start scripting the rest ready. EDIT: Okey, I got it working as I want. Now I just need help with those other things. ;Pre info $argument = " -w -nohide -ns" $Account = IniRead("Settings.ini", "Section 1", "Account", "Default") $Password = IniRead("Settings.ini", "Section 1", "Password", "Default") $Nr_Characters = IniRead("Settings.ini", "Selection 1", "Nr_Characters", "Default") $Path = IniRead("Settings.ini", "Path", "Diablo II path", "Default") MsgBox(0, "Diablo II", "Hello, this is a Diablo II character checker!") Run($Path & $argument) WinWaitActive("Diablo II") WinMove ( "Diablo II", "", 0, 0 ) Sleep (500) ;Enter to get to main screen Send ("{ENTER}") ;Bnet MouseClick ( "left", 420, 372 ) ;Mark the login name Sleep (3000) MouseClick ( "left", 474, 358, 2) Send ($Account, 1) Send ("{TAB}") Sleep (700) Send ($Password, 1) Sleep (1000) Send ("{ENTER}") Sleep (2000) ;Login complite $readusrspot = FileReadLine ("Settings.ini",8) if $readusrspot = 1 Then achar () Else if $readusrspot = 2 Then achar () bchar () Else if $readusrspot = 3 Then achar () bchar () cchar () Else if $readusrspot = 4 Then achar () bchar () cchar () dchar () Else if $readusrspot = 5 Then achar () bchar () cchar () dchar () echar () Else if $readusrspot = 6 Then achar () bchar () cchar () dchar () echar () fchar () Else if $readusrspot = 7 Then achar () bchar () cchar () dchar () echar () fchar () gchar () Else if $readusrspot = 8 Then achar () bchar () cchar () dchar () echar () fchar () gchar () hchar () EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndIf Func achar () MouseClick("left",211,174,1,1) Sleep (200) Send ("{ENTER}") Sleep (3000) ;Press join game MouseClick ( "left", 709, 484 ) Sleep (2000) ;Double click on game MouseClick ( "left", 504, 251, 2 ) ;How long to wait in game Sleep (5000) Send ( "{ESC}" ) Sleep (200) Send ( "{UP}" ) Sleep (200) Send ( "{ENTER}" ) Sleep (1000) Send ( "{ESC}" ) Sleep (3000) EndFunc Func bchar () MouseClick("left",415,164,1,1) Sleep (200) Send ("{ENTER}") Sleep (3000) ;Press join game MouseClick ( "left", 709, 484 ) Sleep (2000) ;Double click on game MouseClick ( "left", 504, 251, 2 ) ;How long to wait in game Sleep (5000) Send ( "{ESC}" ) Sleep (200) Send ( "{UP}" ) Sleep (200) Send ( "{ENTER}" ) Sleep (1000) Send ( "{ESC}" ) Sleep (3000) EndFunc Func cchar () MouseClick("left",229,257,1,1) Sleep (200) Send ("{ENTER}") Sleep (3000) ;Press join game MouseClick ( "left", 709, 484 ) Sleep (2000) ;Double click on game MouseClick ( "left", 504, 251, 2 ) ;How long to wait in game Sleep (5000) Send ( "{ESC}" ) Sleep (200) Send ( "{UP}" ) Sleep (200) Send ( "{ENTER}" ) Sleep (1000) Send ( "{ESC}" ) Sleep (3000) EndFunc Func dchar () MouseClick("left",415,253,1,1) Sleep (200) Send ("{ENTER}") Sleep (3000) ;Press join game MouseClick ( "left", 709, 484 ) Sleep (2000) ;Double click on game MouseClick ( "left", 504, 251, 2 ) ;How long to wait in game Sleep (5000) Send ( "{ESC}" ) Sleep (200) Send ( "{UP}" ) Sleep (200) Send ( "{ENTER}" ) Sleep (1000) Send ( "{ESC}" ) Sleep (3000) EndFunc Func echar () MouseClick("left",177,341,1,1) Sleep (200) Send ("{ENTER}") Sleep (3000) ;Press join game MouseClick ( "left", 709, 484 ) Sleep (2000) ;Double click on game MouseClick ( "left", 504, 251, 2 ) ;How long to wait in game Sleep (5000) Send ( "{ESC}" ) Sleep (200) Send ( "{UP}" ) Sleep (200) Send ( "{ENTER}" ) Sleep (1000) Send ( "{ESC}" ) Sleep (3000) EndFunc Func fchar () MouseClick("left",408,341,1,1) Sleep (200) Send ("{ENTER}") Sleep (3000) ;Press join game MouseClick ( "left", 709, 484 ) Sleep (2000) ;Double click on game MouseClick ( "left", 504, 251, 2 ) ;How long to wait in game Sleep (5000) Send ( "{ESC}" ) Sleep (200) Send ( "{UP}" ) Sleep (200) Send ( "{ENTER}" ) Sleep (1000) Send ( "{ESC}" ) Sleep (3000) EndFunc Func gchar () MouseClick("left",161,427,1,1) Sleep (200) Send ("{ENTER}") Sleep (3000) ;Press join game MouseClick ( "left", 709, 484 ) Sleep (2000) ;Double click on game MouseClick ( "left", 504, 251, 2 ) ;How long to wait in game Sleep (5000) Send ( "{ESC}" ) Sleep (200) Send ( "{UP}" ) Sleep (200) Send ( "{ENTER}" ) Sleep (1000) Send ( "{ESC}" ) Sleep (3000) EndFunc Func hchar () MouseClick("left",438,431,1,1) Sleep (200) Send ("{ENTER}") Sleep (3000) ;Press join game MouseClick ( "left", 709, 484 ) Sleep (2000) ;Double click on game MouseClick ( "left", 504, 251, 2 ) ;How long to wait in game Sleep (5000) Send ( "{ESC}" ) Sleep (200) Send ( "{UP}" ) Sleep (200) Send ( "{ENTER}" ) Sleep (1000) Send ( "{ESC}" ) Sleep (3000) EndFuncSettings.ini [Path] Diablo II path="D:\Program\Diablo II\Diablo II.exe" [Section 1] Account=asdasd Password=12312 Nr_Characters: 3 EDIT2: Okey I changed so the script is shorter but I havn't tried it yet because I got temporarly banned because I joined and left to many games. But I wonder if its possible to let it wait until its connected to bnet instead of having it time based. Same for all thing, because time based doesn't really make it compatable for all machines.
  19. Oh, your quick on this ^^ Okey made some minor changes. So now its logging in atleast by reading the ini, same with the path. ;Pre info $argument = " -w -nohide -ns" $Account = IniRead("Settings.ini", "Section 1", "Account", "Default") $Password = IniRead("Settings.ini", "Section 1", "Password", "Default") $NrCharacters = IniRead("Settings.ini", "Selection 1", "NrCharacters", "Default") $Path = IniRead("Settings.ini", "Path", "Diablo II path", "Default") MsgBox(0, "Diablo II", "Hello, this is a Diablo II character checker!") Run($Path & $argument) WinWaitActive("Diablo II") WinMove ( "Diablo II", "", 0, 0 ) Sleep (500) ;Enter to get to main screen Send ("{ENTER}") ;Bnet MouseClick ( "left", 420, 372 ) ;Mark the login name Sleep (2000) MouseClick ( "left", 474, 358, 2) Send ($Account, 1) Send ("{TAB}") Send ($Password, 1) Sleep (500) Send ("{ENTER}") [Path] Diablo II path="D:\Program\Diablo II\Diablo II.exe" [Section 1] Account= Password= NrCharacters= Okey but now, how do I do the other thing I asked: Making a selection I want to repeat Also, is it possible to fix so I can add more accounts to the ini without changing the script? I got more questions but I ask later
  20. Thanks, helped me alot! Okey this is what I currenly got: MsgBox(0, "Diablo II", "Hello, this is a Diablo II character checker!") $argument = " -w -nohide -ns" Run("D:\Program\Diablo II\Diablo II.exe" & $argument) WinWaitActive("Diablo II") WinMove ( "Diablo II", "", 0, 0 ) Sleep (500) ;{Enter} to get to main screen Send ("{ENTER}") ;Bnet MouseClick ( "left", 420, 372 ) ;Mark the login name Sleep (2000) MouseClick ( "left", 474, 358, 2) But now I need afew more hints how: - I read a file and then write what it sess. A file like this: Account: Lala Password: Lala Characters: 6 Then so I can just copy this and it just keep on reading it so it doensn't matter how many I write in. Is this possible? - Second this I need help with is that I would like to repeat things, how do I do that? Like: Command1 Mouseclick ("left") Sleep ("500") Then I can use this line instead of writing it everytime so I get a cleaner script. Regards, Humper
  21. Oh as usual I explained very bad. The things I didn't really understand is: Run ("D:\hello.exe" -w -hs) How do I get run work with parameters? How do I make it read an .txt / .ini so I can complite it and still change values? Regards, Humper
  22. Hello, Im having har time to run a program with parameters. I would like to have 3 different parameters when I run but I don't know how to do. Also I would like some more help with some basic stuff. This is what I would like to do: msgbox run program (with parameters) after okey pressed move window to 0, 0 (x,y) //REPEATING COMMAND 1 Click on x,y Click x,y send ^a (ctrl) Read ini file Send line 1 (from ini) Send {TAB} Send line 2 (from ini) Send {ENTER} Read ini line 3, (How many boxes pressed) // Do *RC 1* //*Repeating command 2* Click x,y Click x,y enter Sleep 300000 Send {ESC} {DOWN} {ENTER} Send {ESC} // Send {ENTER} (Box 1) Do *RC 2* Send {RIGHT} {ENTER} (Box 2) Do *RC 2* Send {DOWN} {ENTER} (Box 3) Do *RC 2* Send {DOWN} {RIGHT} {ENTER} (Box 4) Do *RC 2* Send {DOWN} {DOWN} {ENTER} (Box 5) Do *RC 2* Send {DOWN} {DOWN} {RIGHT} {ENTER} (BOX 6) Do *RC 2* Send {DOWN} {DOWN} {DOWN} {ENTER} (BOX 7) Do *RC 2* Send {DOWN} {DOWN} {DOWN} {RIGHT} {ENTER} (BOX 8) Do *RC 2* Send {ESC} Do *RC 1* BUT read ini line 4,5,6 instead. and repeat the same pattern for boxes. This should be as many lines as possible. Thanks in advance hope you can help me with some. Specially with reading a ini file and fixing parameters. Regards, Humper
  23. I also what this but In a pritty different way then you guys discribed, not totally tho. I wanna control my maplestory character with my phone. Maplestory got directinput block, so I have to either create a driver or somthing, Tho im really to bad at that might look somthing up later. I got script for bluetooth control. Regards Humper
  24. Thanks but theres 2 of them and their both at tray.
  25. Hello I wonder how I close a process, and not kill it. ProcessClose, this is the command for killing a process. I mean like when you press alt+f4/press the X. Regards Humper
×
×
  • Create New...