Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Zasypuje pytaniami.


Rekomendowane odpowiedzi

Opublikowano

Wiec pare pytanek

 

1. Majac funkcje dircreate moge zrobic folder.

Dla przykladu daje dircreate ( "foldertest" )

Zapisuje sie on na lokalizacji pliku ktory tworze.

Ja bym chcial aby zapisywal sie ten folder na lokalizacji %appdata%

Moze mi ktos powiedziec jak to zrobic?

 

2. Mam takie cos,

local $iContentLength = 0
Global $sHost = "mashinghub.com"
Global $sTarget = "site_media/wp-content/uploads/2010/12/Digtal-painting-deviantart-4_thumb.jpg"
Global $sDestination = @ScriptDir & "/Digtal-painting-deviantart-4_thumb.jpg"

Czemu po pobraniu obrazek nie dziala?

 

3. Czy moze mi ktos podac przyklad odczytu textu z pliku .txt

 

 

4. Powiedzmy ze mam gui, chce zrobic aby pokazywal sie w nim text i po 5 sek zmienial sie na inny.

 

 

Prosze o jasne wypowiedzi.

Dzieki.

table_name,9,10,11 from information_schema.tables

 

Opublikowano

1, podajesz pelna sciezke

2. niema zadnego obrazka pod ta sciezka http://mashinghub.co...art-4_thumb.jpg

3.http://www.autoitscript.com/autoit3/docs/functions/FileRead.htm

4.timers.au3 lub abdilregister

 

Tak tylko do do tej sciezki to jest taki problem ze robie takiego testowego patchera i chce aby, to sie zapisywalo na kazdym komputerze.

A jak wiesz kazdy komputer ma inna sciezke czyli dla przykladu

C:\Users\Ar-Zi\AppData\foldertest

 

Chce aby to sie u kazdego na appdacie zapisywalo

table_name,9,10,11 from information_schema.tables

 

Opublikowano

1.

Bardzo proste...

@AppDataDir

2.

Jakim sposobem go pobrałeś?

Co chcesz z nim zrobić?

Jak nie działa?

3.

$file = FileOpen("wypracowanie.txt")
$text = FileRead($file,-1)
MsgBox(0,"Wypracowanie",$text)

4.

Label, GUICtrlSetData i Sleep.

Albo zamiast Sleep'a daj AdlibRegister.

Opublikowano

1.

Bardzo proste...

@AppDataDir

2.

Jakim sposobem go pobrałeś?

Co chcesz z nim zrobić?

Jak nie działa?

3.

$file = FileOpen("wypracowanie.txt")
$text = FileRead($file,-1)
MsgBox(0,"Wypracowanie",$text)

4.

Label, GUICtrlSetData i Sleep.

Albo zamiast Sleep'a daj AdlibRegister.

 

Error :C:\Users\Ar-Zi\Documents\editbox2.au3(53,23) : ERROR: @AppDataDir is not a COM object\

 

W ogole chyba nie o to chodzi

Nom tak jak myslalem ta funkcja odczytuje.

table_name,9,10,11 from information_schema.tables

 

Opublikowano

maja cos takiego

Opt("MustDeclareVars", 1)
global $data
Global $bChunk, $bData = "", $hFile
local $iContentLength = 0
DirCreate(@AppDataDir & "\testfolder")
Global $sHost = "imperiumtapet.pl"
Global $sTarget = "site_media/wallpaper/42472/image/bc9b95f43a74bb6c6d34.bmp"
Global $sDestination = @AppDataDir & "\testfolder\test.bmp" 

 

Czemu nie zapisuje sie na app data w folderze?

table_name,9,10,11 from information_schema.tables

 

Opublikowano

Daje kod:

 

 


#include <GUIConstantsEx.au3>
#include "WinHttp.au3"
#include "timers.au3"

_Main()

Func _Main()

       ;Initialize variables
       Local $GUIWidth = 300, $GUIHeight = 250
       Local $Edit_1, $OK_Btn, $Cancel_Btn, $msg
       Local $file = FileOpen("test.txt", 0)

       #forceref $Edit_1

       ;Create window
       GUICreate("Beta Resthea.eu by Arczi", $GUIWidth, $GUIHeight)

       ;Create an edit box with no text in it
       $Edit_1 = GUICtrlCreateEdit(" rozpoczynam lodowanie plikow konfiguracji.", 10, 10, 280, 190)

       ;Create an "OK" button
       $OK_Btn = GUICtrlCreateButton("Update", 75, 210, 70, 25)

       ;Create a "CANCEL" button
       $Cancel_Btn = GUICtrlCreateButton("Anuluj", 165, 210, 70, 25)

       ;Show window/Make the window visible
       GUISetState(@SW_SHOW)

If $file = -1 Then
       MsgBox(0, "Error", "Unable to open file.")
       Exit
EndIf

; Read in lines of text until the EOF is reached
While 1
       Local $line = FileReadLine($file)
       If @error = -1 Then ExitLoop
       MsgBox(0, "Line read:", $line)
WEnd

FileClose($file)

       While 1
               ;After every loop check if the user clicked something in the GUI window
               $msg = GUIGetMsg()

               Select

                       ;Check if user clicked on the close button
                       Case $msg = $GUI_EVENT_CLOSE
                               ;Destroy the GUI including the controls
                               GUIDelete()
                               ;Exit the script
                               Exit

                               ;Check if user clicked on the "OK" button
                       Case $msg = $OK_Btn
                               MsgBox(64, "New GUI", "You clicked on the OK button!")
Opt("MustDeclareVars", 1)
global $data
Global $bChunk, $bData = "", $hFile
local $iContentLength = 0
DirCreate(@AppDataDir & "\testfolder")
Global $sHost = "imperiumtapet.pl"
Global $sTarget = "site_media/wallpaper/42472/image/bc9b95f43a74bb6c6d34.bmp"
Global $sDestination = @AppDataDir & "\testfolder\CatHot.bmp"


sleep ( 5000 )
Exit

                               ;Check if user clicked on the "CANCEL" button
                       Case $msg = $Cancel_Btn

Exit
               EndSelect
       WEnd

EndFunc   ;==>_Main

 

table_name,9,10,11 from information_schema.tables

 

Opublikowano

maja cos takiego

Opt("MustDeclareVars", 1)
global $data
Global $bChunk, $bData = "", $hFile
local $iContentLength = 0
DirCreate(@AppDataDir & "\testfolder")
Global $sHost = "imperiumtapet.pl"
Global $sTarget = "site_media/wallpaper/42472/image/bc9b95f43a74bb6c6d34.bmp"
Global $sDestination = @AppDataDir & "\testfolder\test.bmp" 

 

Czemu nie zapisuje sie na app data w folderze?

Logiczne myślenie i samodzielność to gatunki wymierające. Przerażający fakt.

Z przykrością muszę stwierdzić że widać to po tobie.

 

Daje kod:

 

 


#include <GUIConstantsEx.au3>
#include "WinHttp.au3"
#include "timers.au3"

_Main()

Func _Main()

;Initialize variables
Local $GUIWidth = 300, $GUIHeight = 250
Local $Edit_1, $OK_Btn, $Cancel_Btn, $msg
Local $file = FileOpen("test.txt", 0)

#forceref $Edit_1

;Create window
GUICreate("Beta Resthea.eu by Arczi", $GUIWidth, $GUIHeight)

;Create an edit box with no text in it
$Edit_1 = GUICtrlCreateEdit(" rozpoczynam lodowanie plikow konfiguracji.", 10, 10, 280, 190)

;Create an "OK" button
$OK_Btn = GUICtrlCreateButton("Update", 75, 210, 70, 25)

;Create a "CANCEL" button
$Cancel_Btn = GUICtrlCreateButton("Anuluj", 165, 210, 70, 25)

;Show window/Make the window visible
GUISetState(@SW_SHOW)

If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf

; Read in lines of text until the EOF is reached
While 1
Local $line = FileReadLine($file)
If @error = -1 Then ExitLoop
MsgBox(0, "Line read:", $line)
WEnd

FileClose($file)

While 1
;After every loop check if the user clicked something in the GUI window
$msg = GUIGetMsg()

Select

;Check if user clicked on the close button
Case $msg = $GUI_EVENT_CLOSE
;Destroy the GUI including the controls
GUIDelete()
;Exit the script
Exit

;Check if user clicked on the "OK" button
Case $msg = $OK_Btn
MsgBox(64, "New GUI", "You clicked on the OK button!")
Opt("MustDeclareVars", 1)
global $data
Global $bChunk, $bData = "", $hFile
local $iContentLength = 0
DirCreate(@AppDataDir & "\testfolder")
Global $sHost = "imperiumtapet.pl"
Global $sTarget = "site_media/wallpaper/42472/image/bc9b95f43a74bb6c6d34.bmp"
Global $sDestination = @AppDataDir & "\testfolder\CatHot.bmp"


sleep ( 5000 )
Exit

;Check if user clicked on the "CANCEL" button
Case $msg = $Cancel_Btn

Exit
EndSelect
WEnd

EndFunc ;==>_Main

 

To chyba oczywiste. Zwyczajnie ***** nie dałeś funkcji do kopiowania!!!

Tworzy folder, ale nie zapisuje bo nie napisałeś że ma zapisać!!!

 

A wogóle to po co te #include'y?

Opublikowano

z netu obrazek trzeba zapisać na dysku inetget i dopiero do do katalogu

 

co do jakości kodu powiem że... może lepiej nie przeklinać ;)

If you = stupid then

insert(foot.in.your.ass)

end if

licznik-54-96732-stat.png

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...