Jump to content

jafo2010

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by jafo2010

  1. Beautiful.. Thanks for the reply. This works good..
  2. I have two edit boxes side by side. I’m trying to control both with a single vertical scroll from the second edit box. Is this possible?
  3. I solved the problem which I will post here in case anyone needs something similar. It's not pretty, but it works. For $i= 1 to 10 $var = RegEnumKey("HKEY_USERS", $i) If @error <> 0 then ExitLoop If $var >= "S-1-5-21-1617767100-1661673603-930774774-" Then RegDelete("HKEY_USERS\" & $var & "Software\PATH OF YOUR CHOICE") EndIf Next
  4. Unfortunately I need this setting to be passed to all users not just the current user, also this will be done remotely and multiple users will log onto these systems.
  5. I hope someone can help with my problem, Im trying to modify a registry value that contains a key which ends with a unique identifier for each computer. Example: HKEY_USERS\S-1-5-21-1617767100-1661673603-930774774-?????\Software\ The first 41 characters after HKEY_USERS are always identical on every machine, the last 5 characters are always unique on every machine. How would I go about reading the first portion to find the ending 5 digits so that I can modify keys beyond the unique key name? Ive tried wildcards but it doesnt seem to work, or perhaps Im using them incorrectly.
  6. I thought about using a separate file, unfortunately the computers being pinged aren't static so it would make using a separate file much more difficult.. as for using AdlibEnable() for calling two functions I tried that but it stalls out the app, I'm pretty new to autoit so I may be doing something wrong, any chance for a small sample I could use for a reference? Thanks
  7. Valuater, Well that does work, but is there any way that Func Pinger() run independently without being called every x number of seconds? What I originally imagined was that every x amount of time the first function simply just reads the status rather than actually run that function. Thanks for the help though, I have a better understanding of functions from your example.
  8. SIone, Thanks for the info, my problem is when I add another function that the second function doesn't do anything. When I add a call to the function then it does start executing the function however I run into even more problems. The second function wont allow anything else to work properly and it still isn't updating the $ping1 and $ping2. Do you have example code of the way you solved the problem?
  9. I'm hoping someone out there can shed some light on this for me. I built a GUI that checks on computer systems that are online or offline, right now the user has to click a button to check, I would like the update to happen automatically. I can do this and it works fine as long as all systems are online, however if a computer is offline then the responsiveness of the GUI suffers. Other than increasing the intervals between checks, I believe I might have to build the code into two functions, one that takes care of the GUI and one that does the pinging of the systems. This way the GUI only has to look at a variable that is updated by the pinging but never has to slow down for the ping to take place, however I cant figure out how to share the information from the second function with the first so it can display an online or offline message to the user. Any ideas on how to go about doing this would be great. Sorry for the quick sample, I don't have the actual code with me so I built this for testing different ways of making it work, so far nothing is working correctly, I'm pretty green and have spent a lot of hours online looking for a solution but I have not been able to solve my problem. #include <GUIConstantsEx.au3> Local $ping1, $ping2, $i _Main() Func _Main() GUICreate("Test", 500, 300) $okbutton = GUICtrlCreateButton("OK", 70, 50, 60) GUISetState(@SW_SHOW) $i = 1 While 1 $msg = GUIGetMsg() $i = $i + 1 if $i = 50 Then $ping1 = Ping("system_abc", 250) if not $ping1 = 0 Then GUICtrlCreateLabel("Online", 30, 100) Else GUICtrlCreateLabel("Offline", 30, 100) EndIf EndIf if $i = 100 then $ping2 = Ping("system_123", 250) if not $ping2 = 0 Then GUICtrlCreateLabel("Online", 30, 130) Else GUICtrlCreateLabel("Offline", 30, 130) EndIf $i = 1 EndIf Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $okbutton MsgBox(0, "", "some code here for the ok button") EndSelect WEnd EndFunc
×
×
  • Create New...