j'ai un petit problème dans mon développement de ART-OS 1.2,
Voila le code :
► Afficher le texte
Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <File.au3>
#include <Array.au3>
$good_stop = FileExists(@ScriptDir&"\stop")
$first="ARTHOS ART-OS [version 1.2.2592]"&@CRLF&"Copyright (c) 2011 ARTHOS CORPORATION. Tous droits réservés."&@CRLF&@CRLF&@ScriptDir&"\ART-OS_Limited_Folder>"
$folder_start=@ScriptDir&"\ART-OS_Limited_Folder"
$gui=guicreate(@ScriptDir&"\ART-OS.exe",1000,500,2,2,BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX))
$pic = GUICtrlCreatePic(@ScriptDir&"\img\BAOI1LP",0,0,1000,500)
GUISetState(@SW_SHOW)
Sleep(2000)
GUICtrlDelete($pic)
$edit = guictrlcreateedit ($first, 0, 0, 1000, 500)
GUICtrlSetBkColor(-1, "000000")
GUICtrlSetFont(-1, 80, 100, "", "System", 2)
GuiCtrlSetColor($edit, 0xFFFFFF)
GUIRegisterMsg($WM_COMMAND, "WM_NOTIFY")
FileDelete(@tempdir&"\old_title_temp")
$old_title=FileWrite(@tempdir&"\old_title_temp",@ScriptDir&"\ART-OS.exe")
Send("{right}")
while 1
$msg = guigetmsg()
If $msg = $GUI_EVENT_CLOSE Then
Exit
EndIf
WEnd
Func WM_NOTIFY($hWnd, $iMsg, $lParam, $wParam)
If(_IsPressed("0D")) Then
Sleep(50)
$file=GUICtrlRead($edit)
FileWrite(@tempdir&"\temp_ART-OS",$file)
_ReplaceStringInFile(@tempdir&"\temp_ART-OS","*rep*",$folder_start)
_ReplaceStringInFile(@tempdir&"\temp_ART-OS","#rep#","*REP*")
_ReplaceStringInFile(@tempdir&"\temp_ART-OS",$folder_start&">","#*.*#")
$lin=_FileCountLines(@tempdir&"\temp_ART-OS")
$last_line=FileReadLine(@tempdir&"\temp_ART-OS",$lin)
_ReplaceStringInFile(@tempdir&"\temp_ART-OS","#*.*#","")
$line=_FileCountLines(@tempdir&"\temp_ART-OS")
$write=FileReadLine(@tempdir&"\temp_ART-OS",$line)
FileDelete(@tempdir&"\temp_ART-OS")
FileWrite(@tempdir&"\temp_ART-OS_com",$write)
$traiter = 0
$re_write = 1
If $last_line = "#*.*#" Then
$traiter = 1
EndIf
;-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If $traiter = 0 Then
$write_2=FileRead(@tempdir&"\temp_ART-OS_com",7)
If $write_2 = "ecrire " Then
_ReplaceStringInFile(@tempdir&"\temp_ART-OS_com","ecrire ","")
$file=FileRead(@tempdir&"\temp_ART-OS_com")
$existfiles = FileExists($file)
If $existfiles = 0 Then
$anciennnnegui = GUICtrlRead($edit)
GUICtrlSetData($edit,"")
Sleep(100)
While 1
Sleep(100)
If _IsPressed("76") Then
Sleep(100)
$cequilaecrit = GUICtrlRead($edit)
Sleep(100)
FileWrite($file,$cequilaecrit)
Sleep(100)
GUICtrlSetData($edit,$anciennnnegui)
Sleep(100)
GUICtrlSetData($edit,GUICtrlRead($edit)&@CRLF&"Votre fichier à été créé."&@CR)
Sleep(100)
ExitLoop
EndIf
WEnd
EndIf
If $existfiles = 1 Then
$anciennnnegui = GUICtrlRead($edit)
GUICtrlSetData($edit,FileRead($file))
Sleep(100)
While 1
Sleep(100)
If _IsPressed("76") Then
Sleep(100)
$cequilaecrit = GUICtrlRead($edit)
Sleep(100)
FileDelete($file)
Sleep(100)
FileWrite($file,$cequilaecrit)
Sleep(100)
GUICtrlSetData($edit,$anciennnnegui)
Sleep(100)
GUICtrlSetData($edit,GUICtrlRead($edit)&@CRLF&"Votre fichier à été modifié."&@CR)
Sleep(100)
ExitLoop
EndIf
WEnd
EndIf
$traiter = 1
EndIf
EndIf
;-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FileDelete(@tempdir&"\temp_ART-OS_com")
If $traiter = 0 Then
$old_gui = GUICtrlRead($edit)
GUICtrlSetData($edit,$old_gui&@CR&"'"&$write&"'"&" n'est pas reconnu en tant que commande interne"&@CRLF&"ou externe, un programme exécutable ou un fichier de commandes."&@CRLF)
Sleep(100)
EndIf
If $re_write = 1 Then
GUICtrlSetData($edit,GUICtrlRead($edit)&@CRLF&@CR&$folder_start&">")
Sleep(100)
EndIf
EndIf
EndFuncLa partie du script qui ne marche pas est placée entre les : ;------------------------------------------------------------------------
Donc si quelqu'un peut m'aider,
merci d'avance





