Jump to content

Autoit 1 Konu 5 Soru...


asmazh
 Share

Recommended Posts

[color="#FF0000"]Merhaba Arkadaşlar...[/color]
[color="#A0522D"]
AutoİT ile bir proje hazırlıyorum fakat bir kaç yerde takılıyorum sizlere takıldığım yerleri soru olarak belirteyim...
[/color]


[color="#FF0000"]SORU 1 :[/color]

[code]#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiEdit.au3>
#include <GuiStatusBar.au3>
#include <GuiConstantsEx.au3>

Opt('MustDeclareVars', 1)

$Debug_Ed = False ; Check ClassName being passed to Edit functions, set to True and use a handle to another control to see it work

_Main()

Func _Main()
Local $StatusBar, $hEdit, $hGUI
Local $Wow64 = ""
If @AutoItX64 Then $Wow64 = "\Wow6432Node"
Local $sFile = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE" & $Wow64 & "\AutoIt v3\AutoIt", "InstallDir") & "\include\changelog.txt"

; Create GUI
$hGUI = GUICreate("Edit Get Line Count", 400, 300)
$hEdit = GUICtrlCreateEdit("", 2, 2, 394, 268)
$StatusBar = _GUICtrlStatusBar_Create($hGUI, -1)
GUISetState()

_GUICtrlEdit_SetText($hEdit, FileRead($sFile))
_GUICtrlStatusBar_SetIcon($StatusBar, 0, 97, "shell32.dll")
_GUICtrlStatusBar_SetText($StatusBar, @TAB & "Lines: " & _GUICtrlEdit_GetLineCount($hEdit))

; Loop until user exits
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>_Main[/code]

Evet Arkadaşlar buradaki edit sayfasının Korumalı olmasını istiyorum yani benim yazdıklarımı silemesinler yazı eklenmesin... NASIL OLACAK ?




[color="#FF0000"]SORU 2 :[/color]

Örneğin bir programı katılımsız yaptım "Compile Sciprit" ettim


[code]#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>

Opt('MustDeclareVars', 1)

Example()

Func Example()
Local $progressbar1, $progressbar2, $button, $wait, $s, $msg, $m

GUICreate("My GUI Progressbar", 220, 100, 100, 200)
$progressbar1 = GUICtrlCreateProgress(10, 10, 200, 20)
GUICtrlSetColor(-1, 32250); not working with Windows XP Style
$progressbar2 = GUICtrlCreateProgress(10, 40, 200, 20, $PBS_SMOOTH)
$button = GUICtrlCreateButton("Start", 75, 70, 70, 20)
GUISetState()

$wait = 20; wait 20ms for next progressstep
$s = 0; progressbar-saveposition
Do
$msg = GUIGetMsg()
If $msg = $button Then
GUICtrlSetData($button, "Stop")
For $i = $s To 100

$m = GUIGetMsg()

If $m = -3 Then ExitLoop

If $m = $button Then
GUICtrlSetData($button, "Next")
$s = $i;save the current bar-position to $s
ExitLoop
Else
$s = 0
GUICtrlSetData($progressbar1, $i)
GUICtrlSetData($progressbar2, (100 - $i))
Sleep($wait)
EndIf
Next
If $i > 100 Then
; $s=0
GUICtrlSetData($button, "Start")
EndIf
EndIf
Until $msg = $GUI_EVENT_CLOSE
EndFunc ;==>Example[/code]


Bu örnekteki "start" butonuna tıkladığımda
RunWait("KATILIMSIZKURULUM") u yükleyecek yüklenene kadarda progresbar dolacak NE KADAR UĞRAŞTIMSA OLMADI.

[color="#FF0000"]
SORU 3 :[/color]

Çok çeşitli programların KATILIMSIZ KURULUMUNU Yaptım BlueLife nin verdiği dosyalar sayesinde ama AutoİT in KATILIMSIZ KURULUMUNU YAPAMADIM...

Yapabilen varsa kodlarını verirse Çok Sevinirim...


[color="#FF0000"]SORU 4 :[/color]

Örneğin Bir button a tıkladığımda sessizce "YerelDiskC" Birleştirilecek böyle bir şey mümkünmü mümkünse kodları verirseniz sevinirim...

[color="#FF0000"]SORU 5 :[/color]

Arkadaşlar en çok takıldığım yer Kendi programıma #region ekliyorum ama işlemiyor örneğin :


#Region
#AutoIt3Wrapper_Icon=İcon\asd.ico
#AutoIt3Wrapper_Outfile=PROGRAMMES.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Description=PROGRAMMES
#AutoIt3Wrapper_Res_Fileversion=5.1.2.3
#AutoIt3Wrapper_Res_LegalCopyright=© 2010 StoneBreak
#AutoIt3Wrapper_Res_Language=1055
#AutoIt3Wrapper_Res_Field=CompanyName|StoneBreak
#AutoIt3Wrapper_Res_Field=Dosya Adı|PROGRAMMES.exe
#AutoIt3Wrapper_Res_Field=Hazırlama Tarihi|%date% %time%
#AutoIt3Wrapper_Res_Field=AutoIt Versiyonu|%AutoItVer%
#EndRegion

Bu Şekilde kodları ekliyorum Scite ekranına (En Üste) daha sonra Build Yani "COMPİLE SCİPRT" Ediyorum fakat bilgiler eklenmiyor bu konuda acil yardım bekliyorum...


[color="#FF0000"]BlueLife a Teşekkür ederiz verdiği örnekler sayesinde güzel şeyler öğreniyorum...[/color] Edited by asmazh
Link to comment
Share on other sites

@asmazh

Cevap1:Yardım dosyasından ilgili gui elemanın stylerine bakmalısın.

[codebox]#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiEdit.au3>
#include <GuiStatusBar.au3>
#include <GuiConstantsEx.au3>
Opt('MustDeclareVars', 1)
$Debug_Ed = False ; Check ClassName being passed to Edit functions, set to True and use a handle to another control to see it work
_Main()

Func _Main()
Local $StatusBar, $hEdit, $hGUI
Local $Wow64 = ""
If @AutoItX64 Then $Wow64 = "\Wow6432Node"
Local $sFile = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE" & $Wow64 & "\AutoIt v3\AutoIt", "InstallDir") & "\include\changelog.txt"
; Create GUI
$hGUI = GUICreate("Edit Get Line Count", 400, 300)
$hEdit = GUICtrlCreateEdit("", 2, 2, 394, 268,0x0800)
GUICtrlSetBkColor(-1,0xffffff)
$StatusBar = _GUICtrlStatusBar_Create($hGUI, -1)
GUISetState()
_GUICtrlEdit_SetText($hEdit, FileRead($sFile))
_GUICtrlStatusBar_SetIcon($StatusBar, 0, 97, "shell32.dll")
_GUICtrlStatusBar_SetText($StatusBar, @TAB & "Lines: " & _GUICtrlEdit_GetLineCount($hEdit))
; Loop until user exits
GUICtrlSetData($hEdit,@CRLF & "Günaydın millet!" & @CRLF,1)
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>_Main[/codebox]

Cevap2: RunWait adındanda anlaşılacağı üzere, çalıştır ve işlemin bitmesini bekle demektir. Haliyle ilgi program kapatılana kadar senin autoit çalışman durur!
Tabi run ile kurulumu başlatıp progresbarı ilerletebilirsin. Ama ilgili kurulan programın ne zamanda kurulacağını bilmediğimiz için progresi düzgün ilerletmek biraz zor.

Cevap3: Autoit portable çalışabilmektedir. Yani katılımsız yapması aslında kolay olsa gerek. Bir kaç reg kaydı ve dosyaları ilgili yere kopyalatmak.
Winrar veyahut smart install maker gibi bir programla rahatlıkla yapılabilir.

Cevap4: Bunun gibi birşey mümkün, lakin böyle bir konuya daha önce ihtiyacım olmadı.
Bence bu iş için autoit ile başka bir programı kontrol etmek daha mantıklı.

Cevap5: Scite açıkken yukarıdaki dosya menüsündeki Tools - Build ile compile et. Tabi güncel autoit sürümünü kullan.
Çok uzun yazmışsın ve biraz kısa kestim kusura bakma :(

Edited by blue_life
Link to comment
Share on other sites

[size="2"][color="#0000ff"][b]Autoit v3
[/b][/color][/size]
[code]http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe[/code]
[color="#0000ff"][b][size="2"]
Autoit SciTE4[/size][/b][/color]

[code]http://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe[/code]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...