Jump to content

ahmet

Active Members
  • Posts

    274
  • Joined

  • Last visited

  • Days Won

    1

ahmet last won the day on May 6 2012

ahmet had the most liked content!

About ahmet

  • Birthday 08/18/1992

Profile Information

  • Location
    Bosnia and Herzegovina

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ahmet's Achievements

  1. What about sqlite database? You can have table names with prefixes or sufixes, ie. Calcultor_perApp, Class1_perClass, OtherClass_perClass. You can embed needed dll into script and load it from memory without writing to disk anything if the licence permits it.
  2. Hi, I have no experinece with virtaul desktops but it is advisable to post runnable code. That way somenone trying to help you has to do a lot less work.
  3. What happens if you use windows title? Show the code you are using. It might be easier someone to help you that way. If you copy handle from AutoIt info tool are you able to get any data for window?
  4. Here are my results on Win 10.
  5. What about Subrogation? You can embed your dll file in your include script and load it from memory?
  6. Then most probably solution from @Dan_555 will work for you.
  7. Hi, do you need something like following #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() Global $sPreviousSelection="";new variable that holds info about last selection ; Create a GUI with various controls. Local $hGUI = GUICreate("Example", 300, 200) ; Create a combobox control. Local $idComboBox = GUICtrlCreateCombo("Item 1", 10, 10, 185, 20) Local $idButton_Close = GUICtrlCreateButton("Close", 210, 170, 85, 25) ; Add additional items to the combobox. GUICtrlSetData($idComboBox, "Item 2|Item 3", "Item 2") ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) Local $sComboRead = "" ; Loop until the user exits. $sPreviousSelection=GUICtrlRead($idComboBox);update variable with the currently selected item While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idButton_Close ExitLoop Case $idComboBox $sComboRead = GUICtrlRead($idComboBox) ;MsgBox($MB_SYSTEMMODAL, "", "The combobox is currently displaying: " & $sComboRead, 0, $hGUI) If $sComboRead<>$sPreviousSelection Then MsgBox(0,"Combobox","Selection changed") $sPreviousSelection=$sComboRead EndIf EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($hGUI) EndFunc ;==>Example When you ask for help it would be good to post runnable code.
  8. There is GUICtrlSetState function.
  9. Here is modified example from help file #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WinAPIGdi.au3> Example() Func Example() ; Create a GUI with various controls. Local $hGUI = GUICreate("Example", 300, 200) ; Create a combobox control. Local $idComboBox = GUICtrlCreateCombo("", 10, 10, 185, 20) Local $idButton_Close = GUICtrlCreateButton("Close", 210, 170, 85, 25) ; Add additional items to the combobox. GUICtrlSetData($idComboBox, "1|2|3|4|5|6|7|8|9|10", "") ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) Local $sComboRead = "" ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idButton_Close ExitLoop Case $idComboBox ;here are actions that will be done when user choses value from combobox GUICtrlSetBkColor($idComboBox,0x00FF00) _WinAPI_RedrawWindow($hGUI) ;$sComboRead = GUICtrlRead($idComboBox) ;MsgBox($MB_SYSTEMMODAL, "", "The combobox is currently displaying: " & $sComboRead, 0, $hGUI) EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($hGUI) EndFunc ;==>Example When asking for help usually it is best practice to post entire code.
  10. It looks like you are confusing return value of function with @error value. RegDelete can return 3 possible values: 1, 0 and 2 (your variable $iRegDelete). If a key is deleted then the value of $iRegDelete will be 1. If there is no key then the value of $iRegDelete will be 0. If there is an error deleting a key then the value of $iRegDelete will be 2 and value of @ error will tell you what kind of error happened in this particular case for value of 2. So for this function if the key does not exists it is when the function executes it is considered as a success - no @error code is set.
  11. Well, of course 1 is a success, and of course @error=0 means there were not any errors and @error=1 means there was some error. You are referring to the return value of the function. If that particular function succeeds then the value of $iRegWrite will be equal to 1. If that function fails then the value of $iRegWrite will be 0. You could write your code like this If $iRegWrite=1 Then ;what to do if RegWrite succeeds Else ;what to do if $iRegWrite has any other value (only zero possible) EndIf Inside "Else" statement you could check for specific error using values of @error.
  12. No, I did not. When everything goes well then @error has value of 0 - it means there was no error.
  13. I hope that I have not misunderstood your question.
  14. If you look in the help file for RegWrite there are following lines: Return Value Success: 1. Failure: 0 and sets the @error flag to non-zero if error writing registry key or value. @error: 1 = unable to open requested key 2 = unable to open requested main key 3 = unable to remote connect to the registry -1 = unable to open requested value -2 = value type not supported. So if @error=1 then if for any reason RegWrite files to open key you will get that first splash message "NOTICE!!", "The Reg String " & $sString & " was not succesfully updated!" If you want that message to be shown for each error that is listed above then you should write: "If @error Then" which means "if @error is anything except 0 then". When there is not an error, when everything goes well, then @error has value of 0.
  15. Does ObjaCreateInterface do something similar?
×
×
  • Create New...