sar02 Posted October 8, 2012 Share Posted October 8, 2012 Autoit de ini dosyasından program çalıştırma ve reg ayarı girme kodu nasıldır? örneğin autoitte ini dosyası ile a.exe programını ve ayar.reg dosyasini kullanmak istersek nasıl bir kod yazılması gerekir? Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted October 8, 2012 Share Posted October 8, 2012 autoit help dosyasında mevcut bu bilgiler birde fazladan udf help dosyası var incelemeni tavsiye ederim. Quote Link to comment Share on other sites More sharing options...
sar02 Posted October 9, 2012 Author Share Posted October 9, 2012 Autoit help dosyasındaki örneklerde istediğim tarzda bir örneğe rastlayamadım. Formdaki üstatlar bu konuya bir el atsa keşke... Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted October 9, 2012 Share Posted October 9, 2012 help dosyasından [CODE] Example() Func Example() ; Write the value of 'AutoIt' to the key 'Title' and in the section labelled 'General'. IniWrite(@ScriptDir & "\Example.ini", "General", "Title", "AutoIt") ; Read the INI file for the value of 'Title' in the section labelled 'General'. Local $sRead = IniRead(@ScriptDir & "\Example.ini", "General", "Title", "Default Value") ; Display the value returned by IniRead. MsgBox(4096, "", "The value of 'Title' in the section labelled 'General' is: " & $sRead) ; Delete the key labelled 'Title'. IniDelete(@ScriptDir & "\Example.ini", "General", "Title") ; Read the INI file for the value of 'Title' in the section labelled 'General'. $sRead = IniRead(@ScriptDir & "\Example.ini", "General", "Title", "Default Value") ; Display the value returned by IniRead. Since there is no key stored the value will be the 'Default Value' passed to IniRead. MsgBox(4096, "", "The value of 'Title' in the section labelled 'General' is: " & $sRead) ; Delete the INI file. FileDelete(@ScriptDir & "\Example.ini") EndFunc ;==>Example [/CODE] [CODE] Local $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir") MsgBox(4096, "Program files are in:", $var) [/CODE] [CODE] RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey", "REG_SZ", "Hello this is a test") ; Write the REG_MULTI_SZ value of "line1" and "line2" RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey1", "REG_MULTI_SZ", "line1" & @LF & "line2") ; Write the REG_MULTI_SZ value of "line1" RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey2", "REG_MULTI_SZ", "line1") ; always add and extra null string RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey3", "REG_MULTI_SZ", "line1" & @LF & "line2" & @LF) RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey4", "REG_MULTI_SZ", "line1" & @LF & @LF & "line2" & @LF) ; empty REG_MULTI_SZ RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey5", "REG_MULTI_SZ", "") ; create just the key RegWrite("HKEY_CURRENT_USER\Software\Test1") [/CODE] Quote Link to comment Share on other sites More sharing options...
sar02 Posted October 9, 2012 Author Share Posted October 9, 2012 Bu Kodlar içinde iniread,iniwrite,inidelete gibi karışık farklı işlevler var. Yapmak istediğim işi daha açık şekilde şöyle ifade edeyim: ben öyle bir kod yazmalıyım ki: kod katılımsız olan setup.exe ve yama.exe yi settings.ini den çalıştıracak ve settings.ini dosyası olacak içinde şunlar yazacak ve daha sonra ini dosyasında değişiklik yapılarak yeni programlar da eklenebilecek (3=program.exe gibi) Yani instaltips.exe gibi olacak ama ekranda yazı belirmeyecek [KURULUM] 1=setup.exe 2=yama.exe buna göre bir kod yazılabilir mi? Quote Link to comment Share on other sites More sharing options...
sar02 Posted October 9, 2012 Author Share Posted October 9, 2012 Sorunu hallettim... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.