Jump to content
Sign in to follow this  
jrkpote

jump of line

Recommended Posts

jrkpote

i have news.txt in http://localhost/loader.news.txt, when i copy this to temp folder whith:

$news = _INetGetSource($URL & "news.txt")
INetGet($URL & "news.txt", @TempDir & "\news.txt", 1)

it converts from:

line1:

line2

line3

Edited by jrkpote

Share this post


Link to post
Share on other sites
Uriziel01

use StringReplace to change those characters to @CRLF's :) Or show me your script code, I will try to find the "bug" :(


Share this post


Link to post
Share on other sites
jrkpote

this is the code

#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 = ".\"
$eu_realmlist = IniRead($config, "Main", "RealmlistFUN", "")
$_realmlist = IniRead($config, "Main", "RealmlistBLIZZ", "")
$bgcolor = IniRead($config, "Main", "BgColor", "0xFFFFFF")
$gui = GUICreate($title, 410, 310)
$news = _INetGetSource($URL & "news.txt")
INetGet($URL & "news.txt", @TempDir & "\news.txt", 1)
$BLIZZ = GUICtrlCreateButton("botton1", 45, 280, 100)
$FUN = GUICtrlCreateButton("botton1", 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()
Edited by jrkpote

Share this post


Link to post
Share on other sites
Uriziel01

Woow what type of chars are that i have tried to delete characters from 1 to 31 (drom ascii table) and they are still there ?! Lol! :) Any other ideas?

EDIT:

What do yout hink about that:

#include<inet.au3>
Global $URL = "http://aeon-wowserver.es/loader/", $ES_READONLY,$WS_VSCROLL
$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 = ".\"
$eu_realmlist = IniRead($config, "Main", "RealmlistFUN", "")
$_realmlist = IniRead($config, "Main", "RealmlistBLIZZ", "")
$bgcolor = IniRead($config, "Main", "BgColor", "0xFFFFFF")
$gui = GUICreate($title, 410, 310)
$news = _INetGetSource($URL & "news.txt")
INetGet($URL & "news.txt", @TempDir & "\news.txt", 1)
sleep(100)
$chars = FileRead(@TempDir & "\news.txt")
$plik=FileOpen(@TempDir & "\news.txt",2)
$chars2=StringReplace($chars,@LF,@CRLF)
FileWrite($plik,$chars2)
FileClose($plik)
$news2 = _INetGetSource($URL & "welcome.txt")
INetGet($URL & "welcome.txt", @TempDir & "\welcome.txt", 1)
$news3 = _INetGetSource($URL & "saludos.txt")
INetGet($URL & "saludos.txt", @TempDir & "\saludos.txt", 1)
$BLIZZ = GUICtrlCreateButton("Aeon Blizz", 45, 280, 100)
$FUN = GUICtrlCreateButton("Aeon FUN", 255, 280, 100)
$logodisp = GUICtrlCreatePic(@TempDir & "\logo.jpg", 5, 5, 400, 100)
$news=StringReplace($news,@LF,@CRLF)
$news2=StringReplace($news2,@LF,@CRLF)
$news3=StringReplace($news3,@LF,@CRLF)
$newsdisp = GUICtrlCreateEdit($news2 & " " & $news & " " & $news3, 5, 105, 400, 170, $ES_READONLY+$WS_VSCROLL)
GUISetBkColor($bgcolor)
GUISetState()
do 
    sleep(10)
until 1=2
Edited by Uriziel01

Share this post


Link to post
Share on other sites
jrkpote

Woow what type of chars are that i have tried to delete characters from 1 to 31 (drom ascii table) and they are still there ?! Lol! :) Any other ideas?

EDIT:

What do yout hink about that:

#include<inet.au3>
Global $URL = "http://localhost/loader/", $ES_READONLY,$WS_VSCROLL
$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 = ".\"
$eu_realmlist = IniRead($config, "Main", "RealmlistFUN", "")
$_realmlist = IniRead($config, "Main", "RealmlistBLIZZ", "")
$bgcolor = IniRead($config, "Main", "BgColor", "0xFFFFFF")
$gui = GUICreate($title, 410, 310)
$news = _INetGetSource($URL & "news.txt")
INetGet($URL & "news.txt", @TempDir & "\news.txt", 1)
sleep(100)
$chars = FileRead(@TempDir & "\news.txt")
$plik=FileOpen(@TempDir & "\news.txt",2)
$chars2=StringReplace($chars,@LF,@CRLF)
FileWrite($plik,$chars2)
FileClose($plik)
$news2 = _INetGetSource($URL & "welcome.txt")
INetGet($URL & "welcome.txt", @TempDir & "\welcome.txt", 1)
$news3 = _INetGetSource($URL & "saludos.txt")
INetGet($URL & "saludos.txt", @TempDir & "\saludos.txt", 1)
$BLIZZ = GUICtrlCreateButton("botton1", 45, 280, 100)
$FUN = GUICtrlCreateButton("botton2", 255, 280, 100)
$logodisp = GUICtrlCreatePic(@TempDir & "\logo.jpg", 5, 5, 400, 100)
$news=StringReplace($news,@LF,@CRLF)
$news2=StringReplace($news2,@LF,@CRLF)
$news3=StringReplace($news3,@LF,@CRLF)
$newsdisp = GUICtrlCreateEdit($news2 & " " & $news & " " & $news3, 5, 105, 400, 170, $ES_READONLY+$WS_VSCROLL)
GUISetBkColor($bgcolor)
GUISetState()
do 
    sleep(10)
until 1=2
news2 and news3 dont's exist, i was wrong, the code is this:

#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 = ".\"
$eu_realmlist = IniRead($config, "Main", "RealmlistFUN", "")
$_realmlist = IniRead($config, "Main", "RealmlistBLIZZ", "")
$bgcolor = IniRead($config, "Main", "BgColor", "0xFFFFFF")
$gui = GUICreate($title, 410, 310)
$news = _INetGetSource($URL & "news.txt")
INetGet($URL & "news.txt", @TempDir & "\news.txt", 1)
$BLIZZ = GUICtrlCreateButton("botton1", 45, 280, 100)
$FUN = 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()
Edited by jrkpote

Share this post


Link to post
Share on other sites
ProgAndy

There was much code you don't need :)

#include <GUIConstants.au3>
#include <Process.au3>
#include <INet.au3>
#include <IE.au3>
#NoTrayIcon
Global $URL = "http://aeon-wowserver.es/loader/", $wowdir = ".\"

;Get INI
$config = @TempDir & "\temp.ini"
INetGet($URL & "config.ini",$config,1)

;REad INI
$title = IniRead($config, "Main", "Title", "WoW Launcher")
$logo = IniRead($config, "Main", "Logo", "")
$news = IniRead($config, "Main", "News", "")
$eu_realmlist = IniRead($config, "Main", "RealmlistFUN", "")
$_realmlist = IniRead($config, "Main", "RealmlistBLIZZ", "")
$bgcolor = IniRead($config, "Main", "BgColor", "0xFFFFFF")

;Downloads
INetGet($URL & $logo, @TempDir & "\logo.jpg", 1)
$news = _INetGetSource($URL & $news)

;GUI
$gui = GUICreate($title, 410, 310)
$BLIZZ = GUICtrlCreateButton("Aeon Blizz", 45, 280, 100)
$FUN = GUICtrlCreateButton("Aeon FUN", 255, 280, 100)
$logodisp = GUICtrlCreatePic(@TempDir & "\logo.jpg", 5, 5, 400, 100)

$news=StringReplace($news,@LF,@CRLF) ;Make LF To CRLF
$newsdisp = GUICtrlCreateEdit($news, 5, 105, 400, 170, $ES_READONLY+$WS_VSCROLL)
GUISetBkColor($bgcolor)
GUISetState()

do
    sleep(10)
until 1=2
Edited 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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×