jrkpote Posted May 1, 2008 Posted May 1, 2008 (edited) hello, i would get info from a config.ini localizated in my web server http://localhost/loader/config.iniconfig.ini[Main] Title=Aragor WoW Server Logo=http://localhost/loader/logo.jpg News=http://localhost/loader/news.txt BgColor=0x000000 Drive=C:/ Realmlist=set realmlist 192.168.0.1 Realmlist2=set realmlist 127.0.0.1loader.au3expandcollapse popup#include <GUIConstants.au3> #include <Process.au3> #include <INet.au3> #include <IE.au3> #NoTrayIcon Global $URL = "http://localhost/loader/" $config = _INetGetSource($URL & "config.ini") $title = IniRead($config, "Main", "Title", "WoW Launcher") $logo = IniRead($config, "Main", "Logo", "") $news = IniRead($config, "Main", "News", "") $wowdir = ".\" $realmlist = FileRead($wowdir & "realmlist.wtf") $eu_realmlist = IniRead($config, "Main", "Realmlist2", "") $_realmlist = IniRead($config, "Main", "Realmlist", "") $bgcolor = IniRead($config, "Main", "BgColor", "0xFFFFFF") $gui = GUICreate($title, 410, 310) $custom = GUICtrlCreateButton("botton1", 45, 280, 100) $original_eu = GUICtrlCreateButton("botton2", 255, 280, 100) $news = _INetGetSource($URL & "news.txt") $news = FileRead($URL & "news.txt") $logo = _INetGetSource($logo, "logo.jpg") $logodisp = GUICtrlCreatePic("logo.jpg", 5, 5, 400, 100) $newsdisp = GUICtrlCreateEdit($news, 5, 105, 400, 170, $ES_READONLY+$WS_VSCROLL) GUISetBkColor($bgcolor) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $original_eu $rc = _RunDos("rmdir /S /Q cache") DirRemove(".\cache") FileDelete($wowdir & "realmlist.wtf") FileWrite($wowdir & "realmlist.wtf", $eu_realmlist) ExitLoop Case $msg = $custom $rc = _RunDos("rmdir /S /Q cache") DirRemove(".\cache") FileDelete($wowdir & "realmlist.wtf") FileWrite($wowdir & "realmlist.wtf", $_realmlist) ExitLoop EndSelect WEndplease help me, and sorry for my english Edited March 25, 2009 by jrkpote
d4rk Posted May 1, 2008 Posted May 1, 2008 what's the problem ? [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
ProgAndy Posted May 1, 2008 Posted May 1, 2008 IniREad is only possible with files: $config = @TempDir & "\temp.ini" INetGet($URL & "config.ini",$config,1) $title = IniRead($config, "Main", "Title", "WoW Launcher") $logo = IniRead($config, "Main", "Logo", "") $news = IniRead($config, "Main", "News", "") *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
jrkpote Posted May 1, 2008 Author Posted May 1, 2008 (edited) not spawn info and logohttp://www.imapeg.com/fullviewer/loader330....jpg/index.htmlit don't get the info in config.iniEDIT:IniREad is only possible with files:$config = @TempDir & "\temp.ini"INetGet($URL & "config.ini",$config,1)$title = IniRead($config, "Main", "Title", "WoW Launcher")$logo = IniRead($config, "Main", "Logo", "")$news = IniRead($config, "Main", "News", "")get background color but not logo and news Edited May 1, 2008 by jrkpote
ProgAndy Posted May 1, 2008 Posted May 1, 2008 (edited) Also, delete this line: $news = FileRead($URL & "news.txt") And Change these lines: $news = _INetGetSource($news) .. INetGet($logo, @SciptDir & "\logo.jpg") $logodisp = GUICtrlCreatePic(@ScriptDir & "\logo.jpg", 5, 5, 400, 100) Edited May 1, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
jrkpote Posted May 1, 2008 Author Posted May 1, 2008 (edited) Global $URL = "http://localhost/loader/" $config = @TempDir & "\temp.ini" INetGet($URL & "config.ini",$config,1) $title = IniRead($config, "Main", "Title", "WoW Launcher") $logo = IniRead($config, "Main", "Logo", "") $news = IniRead($config, "Main", "News", "") $wowdir = ".\" $realmlist = FileRead($wowdir & "realmlist.wtf") $eu_realmlist = IniRead($config, "Main", "Realmlist2", "") $_realmlist = IniRead($config, "Main", "Realmlist", "") $bgcolor = IniRead($config, "Main", "BgColor", "0xFFFFFF") $gui = GUICreate($title, 410, 310) $custom = GUICtrlCreateButton("botton1", 45, 280, 100) $original_eu = GUICtrlCreateButton("botton2", 255, 280, 100) $news = _INetGetSource($URL & "news.txt") $news = _INetGetSource($news) $logo = _INetGetSource($URL & "logo.jpg") INetGet($logo, @SciptDir & "\logo.jpg") $logodisp = GUICtrlCreatePic(@ScriptDir & "\logo.jpg", 5, 5, 400, 100) $newsdisp = GUICtrlCreateEdit($news, 5, 105, 400, 170, $ES_READONLY+$WS_VSCROLL) GUISetBkColor($bgcolor) GUISetState() Line -1: Error: Unknown macro Edited March 25, 2009 by jrkpote
jrkpote Posted May 1, 2008 Author Posted May 1, 2008 (edited) expandcollapse popup#include <GUIConstants.au3> #include <Process.au3> #include <INet.au3> #include <IE.au3> #NoTrayIcon Global $URL = "http://localhost/loader/" $logo = _INetGetSource($URL & "logo.jpg") INetGet($URL & "logo.jpg", @TempDir & "\logo.jpg", 1) $config = @TempDir & "\temp.ini" INetGet($URL & "config.ini",$config,1) $title = IniRead($config, "Main", "Title", "WoW Launcher") $logo = IniRead($config, "Main", "Logo", "") $news = IniRead($config, "Main", "News", "") $wowdir = ".\" $realmlist = FileRead($wowdir & "realmlist.wtf") $eu_realmlist = IniRead($config, "Main", "Realmlist2", "") $_realmlist = IniRead($config, "Main", "Realmlist", "") $bgcolor = IniRead($config, "Main", "BgColor", "0xFFFFFF") $gui = GUICreate($title, 410, 310) $news = _INetGetSource($URL & "news.txt") INetGet($news, @TempDir & "\logo.jpg", 1) $custom = GUICtrlCreateButton("botton1", 45, 280, 100) $original_eu = GUICtrlCreateButton("botton2", 255, 280, 100) $logodisp = GUICtrlCreatePic(@TempDir & "\logo.jpg", 5, 5, 400, 100) $newsdisp = GUICtrlCreateEdit($news, 5, 105, 400, 170, $ES_READONLY+$WS_VSCROLL) GUISetBkColor($bgcolor) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $original_eu $rc = _RunDos("rmdir /S /Q cache") DirRemove(".\cache") FileDelete($wowdir & "realmlist.wtf") FileWrite($wowdir & "realmlist.wtf", $eu_realmlist) ExitLoop Case $msg = $custom $rc = _RunDos("rmdir /S /Q cache") DirRemove(".\cache") FileDelete($wowdir & "realmlist.wtf") FileWrite($wowdir & "realmlist.wtf", $_realmlist) ExitLoop EndSelect WEnd code finish thanks for your help PS: sorry for the doble-post Edited March 25, 2009 by jrkpote
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