Drew Posted March 24, 2008 Share Posted March 24, 2008 Alright this could get confusing as this is a two part program. However I think I can keep this organized. First off, what this program is meant to do: Program 1: This program will install D2War Files into the unknown users Diablo II folder. This will revert the user to a 1.10 status, and give them the necessary files to play our realm. ( This for some reason gets confusing to new members, so I'm trying to help them out. ) Program 2: This will be a LOT of help as new members tend to get discouraged when they can't figure out how to set this up. I hope to ease their minds. What this program will do, is take the provide maphack ( a program used in playing Diablo II, which we allow at our realm. ) and it moves the file to the unknown users Diablo II folder. Afterwards, I'm going to script it to configure itself accordingly. I shouldn't have a problem with that. My Problem: The Maphack folder won't move!!! I've tried so many different ways to get this folder to relocate itself to the users Diablo II folder. I'm going to include the 2 program scripts now: Program 1: expandcollapse popup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; AutoIt Version: 3.0 ; Language: English ; Platform: WinXP ; Author: Kade Youmans ( Dreu ) ; ; Script Function: ; Created for the sole benefit of D2War.Com and its members. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; "To Do" List: ; -Configure buttons to their appropriate actions. ; -Get the up to date D2War File pack. ; -Write the Read Me !CHECK! ; ; GUI Controls, Setup. ; #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Description = GUICreate("D2War Installer", 629, 296, 194, 132) GUISetFont(14, 400, 0, "MS Sans Serif") GUISetBkColor(0x000000) $Heading = GUICtrlCreateLabel("D2War Installer", 104, 32, 433, 84) GUICtrlSetFont(-1, 46, 800, 0, "Sylfaen") GUICtrlSetColor(-1, 0x800000) $Install = GUICtrlCreateButton("Install Now", 16, 136, 193, 33) GUICtrlSetFont(-1, 18, 800, 2, "Comic Sans MS") GUICtrlSetTip(-1, "Click this to insall D2War Now.") $ReadMe = GUICtrlCreateButton("Read Me", 432, 136, 185, 33) GUICtrlSetFont(-1, 18, 800, 2, "Comic Sans MS") GUICtrlSetTip(-1, "Click this to view the Read Me.") $Signature = GUICtrlCreateLabel("Created by: Dreu", 248, 256, 146, 28) GUICtrlSetColor(-1, 0x800000) $Version = GUICtrlCreateLabel("Version 1.02!", 240, 120, 156, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) $MapHack = GUICtrlCreateButton("MapHack V1.0", 224, 192, 193, 33, 0) GUICtrlSetFont(-1, 18, 800, 2, "Comic Sans MS") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE ExitLoop Case $nMsg = $Install DirCopy( @scriptdir &"\Components\d2war_files_v1.1", @programfilesdir &"\Diablo II") If Not @Error Then MsgBox( 1, "Successful", "The D2War files were successfully entered into your Diablo II folder.") EndIf Case $nMsg = $ReadMe ShellExecute(@ScriptDir &"\Components\ReadMe.txt") Case $nMsg = $MapHack $MsgBox = MsgBox( 4, "Warning", "This will close D2War Installer V1.02... Are you sure?") If $MsgBox = 6 Then ShellExecute(@ScriptDir &"\Components\MapHack.exe") Exit EndIf If $MsgBox = 7 Then MsgBox( 1, "Ok", "Ok, operation canceled.") EndIf EndSelect WEnd Program 2: expandcollapse popup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; AutoIt Version: 3.0 ; Language: English ; Platform: WinXP ; Author: Kade Youmans ( Dreu ) ; ; Script Function: ; Helps users install and configure MapHack. ( MousePads Version: ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; "To Do" List: ; -DO THE EFFIN PROGRAM. #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Dreu's MapHack Installer", 463, 250, 193, 125) GUISetBkColor(0x000000) $Overhead = GUICtrlCreateLabel("Automated Maphack Install", 40, 16, 394, 44) GUICtrlSetFont(-1, 22, 800, 0, "Comic Sans MS") GUICtrlSetColor(-1, 0xFF0000) $Go = GUICtrlCreateButton("Go", 176, 152, 121, 33, 0) GUICtrlSetFont(-1, 18, 800, 0, "Comic Sans MS") GUICtrlSetTip(-1, "Installs MapHack") $ReadMe = GUICtrlCreateButton("ReadMe", 128, 80, 217, 41, 0) GUICtrlSetFont(-1, 18, 800, 0, "Comic Sans MS") GUICtrlSetTip(-1, "Opens the ReadMe") $Label1 = GUICtrlCreateLabel("Credits: Dreu and the creators of Mousepads", 48, 208, 377, 28) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x800000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE ExitLoop Case $nMsg = $Go FileCopy( @ScriptDir &"\Maphack", @ProgramFilesdir &"\Diablo II") Case $nMsg = $ReadMe ShellExecute( @ScriptDir &"\ReadMe2.txt") EndSelect WEnd Alright, now that thats there, here are the main points I need help focusing on... ( These lines are located in Program 2. ) While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE ExitLoop Case $nMsg = $Go FileCopy( @ScriptDir &"\Maphack", @ProgramFilesdir &"\Diablo II") Case $nMsg = $ReadMe ShellExecute( @ScriptDir &"\ReadMe2.txt") EndSelect WEnd Mostly: FileCopy( @ScriptDir &"\Maphack", @ProgramFilesdir &"\Diablo II") This "should" move this folder to the folder I want it. ( Diablo II ). But it doesn't... WHY??? I can't seem to figure this out. Please help if you can. I'm sure I included all the information necessary lol. Link to comment Share on other sites More sharing options...
d4rk Posted March 24, 2008 Share Posted March 24, 2008 FileCopy( @ScriptDir &"\Maphack", @ProgramFilesdir &"\Diablo II") you want to copy a dir, use DirCopy() [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
Drew Posted March 24, 2008 Author Share Posted March 24, 2008 Alright. I tried that. But it still isn't moving the files. Heres the code I'm trying now: ( Note: This is only the part necessary to explain what I'm referring now. The rest is in the first post. ) Case $nMsg = $Go DirCreate( @ProgramFilesDir &"\Diablo II\Maphack") DirCopy( @ScriptDir &"\Maphack", @ProgramFilesDir &"\Diablo II\Maphack") If Not @Error Then MsgBox( 0, "Successful", "The necessary Maphack files were entered into your D2Folder as found necessary.") EndIf What I did here, is since DirCopy wouldn't work , I thought maybe it just wouldn't create the new directory. So I made it do that first... It creates the new directory FINE but the files STILL won't go to that folder. I need the files from @ScriptDir &"\Maphack" to go to @ProgramFilesDir &"\Diablo II\Maphack" giving me the line: DirCopy( @ScriptDir &"\Maphack", @ProgramFilesDir &"\Diablo II\Maphack") Is there something I'm doing wrong? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now