Aide et conseils concernant AutoIt et ses outils.
AsHardstyle
Niveau 1
Messages : 14 Enregistré le : sam. 30 mai 2009 05:47
Status :
Hors ligne
#1
Message
par AsHardstyle » dim. 01 nov. 2009 13:59
Salut à tous,
Oui voila donc je vous explique mon probleme, j'ai créer un Guictrlcreateedit qui lui affiche le texte d'un fichier où celui ci recoit du texte en permanence, et je voudrai que mon Guictrlcreateedit soit mis à jour lui aussi en permanence et qu'il affiche la mis jour par le bas.
Je m'explique, disons que je rentre du texte dans le fichier et donc se que je viens d'entrer s'affiche dans mon Guictrlcreateedit.
Voila voila, si vous avez un exemple de script je suis preneur.
As_Hardstyle
Modifié en dernier par
AsHardstyle le lun. 02 nov. 2009 20:35, modifié 2 fois.
jbnh
Niveau 11
Messages : 1932 Enregistré le : ven. 02 mai 2008 14:54
Localisation : Bruxelles
Status :
Hors ligne
#2
Message
par jbnh » dim. 01 nov. 2009 16:27
Bonjour,
http://www.autoitscript.com/autoit3/doc ... etData.htm
Attention a votre titre : c'est [..] pas [...] , merci d'éditer
Balise [..] devant votre requête en cours, [R] quand résolu | Pas de message concernant les bots !
Merci
AsHardstyle
Niveau 1
Messages : 14 Enregistré le : sam. 30 mai 2009 05:47
Status :
Hors ligne
#3
Message
par AsHardstyle » dim. 01 nov. 2009 16:39
Merci, pour votre réponse, il affiche bien le texte à la suite mais le souci c'est qu'à chaque mis à jour la page remonte donc le texte entré n'est pas au premier plan si vous voyez se que je veux dire.
jbnh
Niveau 11
Messages : 1932 Enregistré le : ven. 02 mai 2008 14:54
Localisation : Bruxelles
Status :
Hors ligne
#4
Message
par jbnh » dim. 01 nov. 2009 18:04
Code : Tout sélectionner
$edit = guictrlcreateedit (....)
......
guictrlsetdata ($edit, $newline & @CRLF & GUICtrlRead($edit))
Ainsi, la newline est en haut de l'édit et non en bas.
Cela répond-il à votre Q
Balise [..] devant votre requête en cours, [R] quand résolu | Pas de message concernant les bots !
Merci
AsHardstyle
Niveau 1
Messages : 14 Enregistré le : sam. 30 mai 2009 05:47
Status :
Hors ligne
#5
Message
par AsHardstyle » dim. 01 nov. 2009 22:10
Euh non pas trop, je vais essayé de mieux m'expliquer donc voici un exemple :
► Afficher le texte
Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$NomFenetre = "KBSG v1.0 by As_Hardstyle"
$Fenetre = GuiCreate($NomFenetre, 620, 450)
$Edit = GuiCtrlCreateEdit("", 8, 64, 569, 321)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000044)
$open = FileOpen(@scriptdir & "\Test.txt",0)
$read = FileRead($open)
FileClose($open)
guictrlsetdata ($edit, $read)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
Et voici le .txt qui recoit en permanence tu texte.
► Afficher le texte
[Name]
pecaX=peca
liq_paladin=liquidfiend
LiquidElemental=liquidfiend
TaZ_DeathClown=taz_69
Lolmoo=gourou55
ttrdyytdfgutyut=kevincool6
xSmiteStormx=Firestarter3
roadragingboy=stinkeye
MK_KnightRanger=slunt
pvpez=storm.
INature_ForceI=freshychris
SOGGYMONKEYNUTS=Xsoul_reaperx
aop_destiny=death_note6
Plawx=Plawx
Foforofa=fufurufu
Silent-Spring=narwl_fang
TehBoneMaster=aaamazing85
immortal-Wind=WakeUpSlapPaff
XxXEle-GodXxX=tiger7105
XxPoonCrazzyxX=xxbeermanxx
Titteez=maelun
Tropic_Orb=tropicalmango
PLM_BoNeTHroWer=plm_crazy1_acc
XxXxJoKeRxXxX=uhurt_ilaugh
Voix=iRucus
Sephi_XI=sephirothX
Elite-Tousen=LeGeNdkiLLah
PowRofl=grimgod1337
DOGDlCK=xenoq0
BRak_UrfaceX=thethe
Boodica=cdanield74
tv-hoeSmiter=jkimo17
BOTD_Barbarian=mxrider525
El_Chupranebre=aaamazing85
tiki_zon=fgrir
Senergy=exoc_leader
Uberz_Zeal=Civic_95
jr_vengance=jakeeeee
Colossisx=intensexxx
Djslash=chigangsta
Sparkfisttt=sparkfist
amazing_smith=alexandrep7
I-Iurt=eclipse-
Myface-UrAss=andjoe
QC_plotte=wamaka
FreshObsessed=APS[1337]
elekritc=pf_seeker
OnTheRocks_plz=this_game_again
Joltytwo=rumbo100
Yako-Eclair=yako
Hells_Cold=jekelly1984
AirSeekr=HaydenM
OD-Strike=Hot-wings(OD)
RaVeN_sNiPeR=hughez_p
prsident_choice=tayeulecriss
gwbzdtws=045930534
Yellow_Light=yellow_asian
BpT-LoLzAloT=fredtop07
BuD-LiT=bud-classic
Ink_Spot=my_deal
psi_scorce=psi_knight
MoldyCorpse=khronic
FiveOClockAgain=xXAn0nym0usXx
Ibunnionofdeath=brettruls
Pally_Youknow=billybass
aboveuall=20chubby11
Din_S=HalfMan
PvPSmitePvP=smoushi
mindflare=danammm
XxAuraXDxX=sk8er_beaumier2
TRAPS-MASTA=kylerkicinski
teleho=bonjamin22
Gg_eledruid=matdavfrank
mmmm_tits=no_hesitation
keeneicus=keeneicus
gnmxdym=aleegame-mb
cfjkykdrykxsrky=aleegame-fg
DL-NOOBaDIN=Bilich(dl)
Mnefhik=cybernethik
Angry_Tupac=so_spicy
Oleander=Akaris
MOB_CainsSmiter=cainishalo
Power_Rangers=MxRacer3Z
Mb_smackthatazz=born2mb
Chaotique_boy=chaotique_boy
kp_java=jhplayer92
freeebase=67allday
ZzZ_ZzZ=Bhaic
Heavenly-Smiter=Keelan
ATYOURHOUSE=goodguymansir
eXe-xGoDLyOnEx=lynxiesz
Whirlin_Ax=big_reezy
IrSmasher=enforcer010
painful_Boner=mistermatto123
AmyTheZipZon=killed45
TrappeAsouris=caliss22
LiteWinds=switcher
magicblizzzzzzz=kevthebest
gubbgubb=gubb1gubb
Xx_GodlyAuraxX=godly_89
momhammeryou=bamboumike12
Tantou=mij991
The-Drrrizzle=cryan28
arasbb-rgumwng=aleegame-ra
tearsforme=ez-pk
KILINemSOFTLY=lucky13
xXrbWW=RockBoi-20
FiRE-Ez=patvir2
BlueApex=94f1504x4
qchammer_qc=darkspacemarine
OD-Bedr=bedr(OD)
nBk_Evolution=guarddog513
dream-valor=dreamvalor88
WarR_HammerFTW=xb2kx_riot
Jaded_Knight=jaded_8
sMitejoor_fAce=intoxication71
Killingg-mode=the-ricksterrr
XnerV-Bamf=bamf-11
NiCA_CoSTA=jeisenses3
DyKm_FromSky=teqjoe
J_ayFury=j_ay420
GIGACELL=CURTICUS22
Thunder-Thighz=bazawata
Aso-Jesse=nep215
salty_hamma=salty_sea_rat
Xxaod_killerxX=aod_mule
Nordic_bbaxe=dewhurst11
xgodx=deathbite
CrappyHammerss=kaigne
foxy_ice=xdeathbloomingx
FeralReign=Jarkis138
Poulle_Lee=Bolo_Poule
AlphaXFour=xXUnknownXx
CRASHSCENE=BlastOfPower
sharpobject=bluechiton
P_BoNeRzZ=p_owned
ReptarJesus=StickyWeasle
MrHalpert=akhilleus
jmndykjxdy=aleegame-na
True_Martyr=el_matador
hammerchaos=c0dy57
Silver-Fangs=omega-silver
Lone_Singer=lone_slayer
Wrym=metal_Delwaide
D-Dominatrix=kenjon3
Ameresin=vega000
mc_twoface=hippieofwar
uber_smitess=power_dom66
winter_blue=stride_gum
jdm-zon=97jdmtegy
PerfectStrafer=soulreaper8
RawRrRRUNRawRRR=rawrhydralisk
ReV-Ice=bigp
AoC_JordansJava=5badboys
PallyQuEbEcHmer=kboom
feftog-pfapgkv=aleegame-rb
XcoffinspireX=57i11y
Summon_Bloo=Mad_Shadow
dont_knowname=cfh-wicked1
Misa_Armani=nigastolmywalit
Casis=oscillator
Twat_Stinks=SuicidalifBlack
xczttgqr=109534636
Pollyzon=daeos
xqerdqdzsmj=aleegame-mf
Dreezydin=the.spectre
ThenxxYouxxDie=tttd7
tfl=tfls1
ahS-jyyftw=xdemonizedx
fuku=sick_klown
FareFare=fare2222
Fear-MF=vince-77
DoubIe_Frenzy=theotherandrew
Fuzionz=Soulfuzionz
Espriit=vince-77
RangeFury=lightingice
SuperThor=bigshaun270
ArcaneShot=fecalvomit
oienrmkj=0082138646
VxMcHammerDinxV=dreddiepines
head_rush=magpiethief
RapidCombustion=TaLoNWiNG13
KcF-Batman=Talent5
HamGyn=GINOO
Pro_Poke=MoLesta2
MaskedfaceDOOM=tonymonk123
xXxTinManxXx=xXxOldSpicexXx
chrOnic_nitRo=sscottyy
BoNiErZ=wishes(OD)
ixmaf-sin=ixmaf
Kiss_OO=d0233999
CrypticCrusader=escaping_fate
BoOng=ThorfinNjal
trapta_qcfr=jacklivehere
TaZ_DreamClown=TaZ.92
POWERTEAM_C=sethmo4sho
song-hammer=jina003
PimpJawn=crakerxjacks
xXxzeal-assxXx=tiguigui
jondega=kijucclk
innocente=innocente
sd-sylenced=Sd-sYlEnCeD
PC_LitCocoa=pc_pixiecocoa
Guardian_Azen=leader(clanAzen
fatheadhammers=DOUGER102
Auranyc=jin54
condega=kijucclk
so_dank=dank_one
o-wn=slipknot.rock
AbsoluteFoh=Dr.Dreded2
Luna_Vtic=lunatic6572
Esphea=tower.
RMP_BoneU=xorumpelox
Fore_Lightsicle=fantastic_fore
KeyOf_Terror=darkclan2
Crackster=crackajakkid420
Spiky-Camper=nightmair67
Tekkno=Yuriku
caios-lite=caios-dragon
uow_mf=diablo2_buru
MzKpas-dpitier=xam.max
archetombs=salem1
Notted=nott
DurbanWinds=timmyy20
Corrincha=corrincha
QClight_alexQC=pouudy-ad
CasseNoisette=Drakengodz
BNibelung=10frostymech
SnIpErDiN=airarno
VirginStyle=dSecrets_cruaL
Razzzze=winner4life
TAMR_SpinGuber=djray
Et donc le texte s'ajoute apres la derniere ligne se qui est normal, et je voudrai que dans l'Edit de la GUI le texte s'affiche comme si :
orax
Modérateur
Messages : 1479 Enregistré le : lun. 23 mars 2009 04:50
Localisation : ::1
Status :
Hors ligne
#6
Message
par orax » dim. 01 nov. 2009 22:37
Si j'ai bien compris il faut que l'ascenseur se trouve en bas ?
Code : Tout sélectionner
#Include <GuiEdit.au3>
...
GUISetState(@SW_SHOW)
_GUICtrlEdit_AppendText(GUICtrlGetHandle($edit),$read) ; à placer après guisetstate()
De petits détails peuvent faire toute la différence. — Quand la boule de neige commence à rouler… poussez-la. (Columbo)
AsHardstyle
Niveau 1
Messages : 14 Enregistré le : sam. 30 mai 2009 05:47
Status :
Hors ligne
#7
Message
par AsHardstyle » dim. 01 nov. 2009 23:02
Merci pour ta réponse,
oui c'est sa mais je voudrai que le l'edit soit mis à jour en permanence, c'est à dire que si il y a du texte d'ajouté dans le .txt, ca s'affiche dans l'edit aussi.
Et je ne sais pourquoi avec votre commande il ne m'affiche pas tout le contenu du .txt.
AsHardstyle
Niveau 1
Messages : 14 Enregistré le : sam. 30 mai 2009 05:47
Status :
Hors ligne
#8
Message
par AsHardstyle » lun. 02 nov. 2009 14:59
Bon apres plusieurs essais je n'y suis toujours pas arrivé.
orax
Modérateur
Messages : 1479 Enregistré le : lun. 23 mars 2009 04:50
Localisation : ::1
Status :
Hors ligne
#9
Message
par orax » lun. 02 nov. 2009 19:18
Essayez ça alors. Ca Met à jour l'Edit dès que le fichier est modifié.
► Afficher le texte
Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#include <ScrollBarConstants.au3>
Global Const $FICHIER = @ScriptDir & "\Test.txt"
Global Const $NomFenetre = "KBSG v1.0 by As_Hardstyle"
Global Const $Fenetre = GUICreate($NomFenetre, 620, 450)
Global Const $Edit = GUICtrlCreateEdit("", 8, 64, 569, 321)
Global Const $hEdit = GUICtrlGetHandle($Edit)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000044)
GUISetState(@SW_SHOW)
_GUICtrlEdit_SetLimitText($hEdit, -1)
_GUICtrlEdit_AppendText($hEdit, FileRead($FICHIER))
; récupère l'heure de la dernière modification sur le fichier
Global $derniereModif = FileGetTime($FICHIER, 0, 1)
Global $modif
While 1
$msg = GUIGetMsg()
; si le fichier a été modifié
$modif = FileGetTime($FICHIER, 0, 1)
If $modif > $derniereModif Then
; met à jour complement l'Edit
;~ _GUICtrlEdit_SetText($hEdit, "")
;~ _GUICtrlEdit_AppendText($hEdit, FileRead($FICHIER))
; ou
; ne met à jour que le texte ajouté dans le fichier
_GUICtrlEdit_AppendText($hEdit, StringTrimLeft(FileRead($FICHIER), _GUICtrlEdit_GetTextLen($hEdit)))
$derniereModif = $modif
EndIf
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
Modifié en dernier par
orax le mar. 03 nov. 2009 19:51, modifié 3 fois.
De petits détails peuvent faire toute la différence. — Quand la boule de neige commence à rouler… poussez-la. (Columbo)
AsHardstyle
Niveau 1
Messages : 14 Enregistré le : sam. 30 mai 2009 05:47
Status :
Hors ligne
#10
Message
par AsHardstyle » lun. 02 nov. 2009 20:35
Merci !!!
Grace a toi j'ai pu trouver mon bonheur, cela fonctionne parfaitement.
Encore merci.