
dworld
Active Members-
Posts
41 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by dworld
-
wow, thx :)
-
Well I did it, I know it is not the best solution, but what can I do, I need this feature ;--------------------------------------------------------- #Include <File.au3> ;--------------------------------------------------------- $x = 1 $file = FileOpen("sys.log", 0) $CountLines = _FileCountLines("sys.log") While $x <> $CountLines _FileWriteLineEX($file, $x) Sleep(150) $x += 1 WEnd FileClose($file) ;--------------------------------------------------------- Func _FileWriteLineEX($file, $x) $fileout = FileOpen("sys2.log", 1) $line = FileReadLine($file, $x) ConsoleWrite("Line: " & $x & "Data: " & $line & @LF) FileWriteLine($fileout, $line) FileClose($fileout) EndFunc ;---------------------------------------------------------
-
Thank you for the info Valik! Actually i was wandering about this flush and today i tried to use _WinAPI_FlushFileBuffers($filehandle) without success (it caused the destination file stood empty) Anyway thanks again for the fast replies
-
Well I checked it out, to this time I tried to view the sys2.log file with total commander viewer, now I opened with notepad, and the strange that for the 4th (the file contained already a lot of lines) opening I saw some lines, but by the first 3 opening it was with 0 length and was empty.. Well probably we should increase the sleep time to 200 to can see my problem
-
Hi Everybody, after half day searching and other half day help reading i couldn't figure out how to write a line in a file and see it immediately... The problem with FileWriteLine func that only after all line has been written, can see the lines.. I hope i described clearly what i would like to achieve I made a very simple example which is working as i wrote above:( : ;read a line from sys.log and write it to sys2.log $file = FileOpen("sys.log", 0) $fileout = FileOpen("sys2.log", 2) While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop sleep(50) ; slow it down for testing.. FileWriteLine($fileout, $line) Wend FileClose($fileout) FileClose($file) Until the script is running i'm trying to view the contents of the file, but it is empty till the script don't finish.. Thanks for any help in advance!
-
Hi, well my idea is the following (i already implemented it and it's working ) : so i just guess I'll adjust the number of rows and columns in the registry before i open putty window. like: Global $ActualColumns = Int(($PaneWidth-40)/8) ; 40 - just a dummy constant Global $ActualRows = Int(($PaneHeight-20)/17) ; 20 - statusbar height ; For example in CreateGUI function. RegWrite("HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\TestSession\", "TermWidth", "REG_DWORD", $ActualColumns) RegWrite("HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\TestSession\", "TermHeight", "REG_DWORD", $ActualRows) Please notice you don't need to convert int to hex.. yes I know it takes time to guess the scale rate, but it worth it
-
Well done man! This is exactly what I'm looking for.. I'm just wondering if it's work when the sapgui is embedded into the autoit gui.. Sadly I have limited hours to access sap, so I can not try your udf yet:) but I'll give a feedback Last question: is it working with sapgui 710?
-
I'm happy that i could help! one more thing, could you change the title to: [solved]Checkbox GUI error? just to follow the rules.. >_<
-
well I found the solution! the problem was with Opt("GUICoordMode",2) I hope this will solve your problem..
-
yes, i see now, i'll try o guess sg edit: well it's very strange, with LxP's FindClassesByText example script you can see the checkboxes on _ATUGui() createted gui..
-
well i cannot test your code, because in atGui.au3 are few functions which are declarated in lpr.au3
-
hello, maybe there is problem with the include: shouldn't it look like: #include "atugui.au3" just a tip, I think this, becoz' I couldn't find this atugui.au3 at the general includes but i'll try now.. and i see there is other problem too both of the file contains part for: "GUISetState() ; Run the GUI until the dialog is closed" I think if you include one UDF only the main file has to handle the gui, but maybe I wrong
-
making a gui for my script need help
dworld replied to delaghetto's topic in AutoIt GUI Help and Support
you won, respect -
hi, @Nblufire12: well I'm c++ programmer, and i'm learning AutoIt since end of June, what to say, now I'm in very big project the source code has already 3500++ lines, and it's embedding SAP, IE, and PuTTY, programs to itself and so on.. so it's very easy to start to learn, and as Tomb616 said it has _amazing_ help, the best I've ever seen.. In the helpfile you will find a lot of examples, for the GUI creation too (GUICreate), but i have to agree with Zisly's sentences @Tomb616: I think you should try Borland C++ Builder 3, it is perfect for learning, and the help is on similar level like AutoIt's.. I'm sure you can get it for free, there is educational version too, so I offer you that.. well it's not a chat, so i'll shut up..
-
Hi it's amazing.. I really like it and will use it! Thx monoceres go on and don't stop:) one question: what do you think if you can change the height of the form in order to see much more items in the list?
-
I hope i didn't misunderstand the "Names of all hotkeys" and you need this: Windows XP Hotkeys - keyboard Shortcuts
-
making a gui for my script need help
dworld replied to delaghetto's topic in AutoIt GUI Help and Support
hello rasim thank you very much for the correction I'm just new at AutoIt and not using too events, which is not good, so I'll change this:) I like your code, and I know that the matter is that "We need to call GetPos() func only when mouse moved to avoid control flickering and reduce CPU usage", but just to make perfect the solution we should change few things: #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Global $hGUI, $x, $yoÝ÷ ÚÚºÚ"µÍÚ[ÛYH ÑÕRPÛÛÝ[Ñ^]LÉÝÂÚ[ÛYH ÕÚ[TK]LÉÝÂÜ ÌÎNÓ]ÝXÛUÉÌÎNËJBÛØ[ ÌÍÚÕRK ÌÍÞ ÌÍÞK ÌÍØoÝ÷ Ù©Ýjëh×6Func GetPos() Local $a = GUIGetCursorInfo() ControlSetText($hGUI, "", $x, "X - " & $a[0]) ControlSetText($hGUI, "", $y, "Y - " & $a[1]) EndFunc ;==>GetPosoÝ÷ ÚÚºÚ"µÍ[ÈÙ]ÜÊ BIÌÍØHHÕÚ[TWÑÙ]ÝÛÜ[Ê BÛÛÛÙ]^ ÌÍÚÕRK ][ÝÉ][ÝË ÌÍÞ ][ÝÖH ][ÝÈ [È ÌÍØVÌ×JBÛÛÛÙ]^ ÌÍÚÕRK ][ÝÉ][ÝË ÌÍÞK ][ÝÖHH ][ÝÈ [È ÌÍØVÍJB[[ÈÏOIÝÑÙ]Üin order to be not relative to GUI window. -
hi, in which application you want to know the hotkeys? or just generally in Windows?
-
Hi synthie, :)Welcome to AutoIt forums when you want to use quotes, you should use the following way: ' " " ' and it should work. Otherwise i tried to implement this into your code but it wasn't work for me too.. probably there is problem with the executable path
-
bravo rover i like your solution respect
-
Hello cherdeg, I wrote it, but I didn't find the way to disable the whole group control, so I disabled the items one by one: #include <GUIConstants.au3> #include <GUIComboBox.au3> #include <ComboConstants.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 0) $Debug_CB = False ; Check ClassName being passed to ComboBox/ComboBoxEx functions, set to True and use a handle to another control to see it work ;------------------------------------------------------------------------------------------------------------------------- Global $selectedItem Global $comboCheck CreateGUI() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd ;------------------------------------------------------------------------------------------------------------------------- Func CreateGUI() $hGUI = GUICreate("Group manipulate", 400, 400) $grpOne = GUICtrlCreateGroup("Group", 10, 10, 250, 250) GUIStartGroup() ; I'm not sure that we need this $radio_1 = GUICtrlCreateRadio("Radio 1", 30, 90, 60, 20) $radio_2 = GUICtrlCreateRadio("Radio 2", 30, 110, 60, 50) $comboCheck = _GUICtrlComboBox_Create($hGUI, "", 10, 270, 220, 120, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) ;_GUICtrlComboBox_BeginUpdate($comboCheck) _GUICtrlComboBox_AddString($comboCheck, "Enable") _GUICtrlComboBox_AddString($comboCheck, "Disable") ;_GUICtrlComboBox_EndUpdate($comboCheck) ; set default values _GUICtrlComboBox_SetCurSel($comboCheck, 0) GUICtrlSetState($radio_1, $GUI_CHECKED) ;~ ; Help to catch combobox events GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") GUISetState() EndFunc ;------------------------------------------------------------------------------------------------------------------------- Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg Local $hWndFrom, $iIDFrom, $iCode $hWndFrom = $ilParam $iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word $iCode = BitShift($iwParam, 16) ; Hi Word Switch $hWndFrom Case $comboCheck Switch $iCode Case $CBN_CLOSEUP ; Sent when the list box of a combo box has been closed Case $CBN_SELCHANGE ; Sent when the user changes the current selection in the list box of a combo box $selectedItem = _GUICtrlComboBox_GetCurSel($comboCheck) Switch $selectedItem Case 0 ControlEnable("Group manipulate", "", "[CLASS:Button; INSTANCE:2]") ; i know that there is other way ControlEnable("Group manipulate", "", "[CLASS:Button; INSTANCE:3]") ; to disable control but for it always work Case 1 ControlDisable("Group manipulate", "", "[CLASS:Button; INSTANCE:2]") ControlDisable("Group manipulate", "", "[CLASS:Button; INSTANCE:3]") EndSwitch EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND ;------------------------------------------------------------------------------------------------------------------------- I'll try to guess, how to do it, but if you are faster, please don't hesitate to share your code with us:) edit: It could be a solution, when you create the controls, store them in one array, and when you need you can disable them much faster and easier..
-
I think this is what you need, i found it in the help file: $var = DriveGetDrive( "removable" ) If NOT @error Then MsgBox(4096,"", "Found " & $var[0] & " drives") For $i = 1 to $var[0] MsgBox(4096,"Drive " & $i, $var[$i]) Next EndIf the example will work if removable drive is connected
-
Hi, I know that it is an old thread, but I'll give a try: this is not working for me $Wrp = ObjCreate("SapROTWr.SapROTWrapper") $SapGui = $Wrp.GetROTEntry ("SAPGUI") $application = $SapGui.GetScriptingEngine My AutoIt version is 3.2.13.0 I'm using SAP Logon 710 and i added my .exe in the SAP Konfiguration. Thank you for the help in advance
-
It's AMAZING this is what i need exactly:) small, portable, clever.. congrats, and pls don't stop >_<
-
i found new info: Under this key: HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices And as the name of the key show you will find here the drive letters, and if you double click on one - which is not harddrive - you will see on the right side in the text that it is a CDROM or USB drive. edit: Query one of the drive values: reg query HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices /v "\DosDevices\H:" So if you have a a for cycle which is querying the mounted drives registry values, and can read that it is a Removable media, or cdrom, you'll be able to guess which is the correct letter for USB, and you can work with it. The problem is that the query will return in hex HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices \DosDevices\H: REG_BINARY 5C003F003F005C00530054004F00520041004700 45002300520065006D006F007600610062006C0065004D0065006400690061002300370026003700 39006100350030006100620026003000260052004D0023007B003500330066003500360033003000 64002D0062003600620066002D0031003100640030002D0039003400660032002D00300030006100 3000630039003100650066006200380062007D00 The other problem is that, once you connected an USB drive, the letter will stay in the registry, so it is possible that there will be more than 1 letters which will be not assigned to any drive Actually I think there should be an easier solution, and i don't want to take your script developing to wrong direction with this registry thing. Maybe we should wait somebody other, more experienced member's opinion..