Jump to content

Crazyace

Active Members
  • Posts

    54
  • Joined

  • Last visited

About Crazyace

  • Birthday 11/07/1983

Profile Information

  • Location
    Nashville TN
  • Interests
    Not Computers

Crazyace's Achievements

Wayfarer

Wayfarer (2/7)

0

Reputation

  1. Opps, I was doing that for testing before. Going to change it.
  2. Func _Fire($sServiceTag) $oIE = _IECreate("http://www.dell.com/support/drivers/us/en/04/DriversHome/NeedProductSelection", 0, 1, 0) $oFrame = _IEFormGetObjByName($oIE, "iFramePSHost") $oID = _IEGetObjById($oFrame, "TheProductSelectorResultsModel_ServiceTagCode") _IEFormElementSetValue($oID, $sServiceTag) _IEAction() EndFunc ;==>_Fire Here is what I have so far but I think I'm way off base with this.
  3. I found out that it's that damn UAC that's causing an issue here.
  4. Thanks Dale for the support. Also I want to point out my poor wording. What I mean is just see an order of which _IE functions should be in. That way I have a lot more time to focus on getting the right info into the functions. I'm also going to guess that it may not have an order at all, and that it may just depend on what you're looking to do. But with the ones that you listed before, should they go roughly in that order?
  5. That sounds right yes. Would you mind helping me build the code for that? Here is the code for my current app that would use that. In the code it will be the first _Fire() function. #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..faviconBX.ico #AutoIt3Wrapper_Res_Comment=Beta #AutoIt3Wrapper_Res_Fileversion=3.0.0.0 #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker #AutoIt3Wrapper_Run_Tidy=y #AutoIt3Wrapper_Run_Obfuscator=n #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.9.4 (beta) Author: Crazyace Script Function: Allows you to look up your service tag, drivers, warranty and manual Script Version: Beta 1.3 #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstants.au3> #include <IE.au3> #include <Constants.au3> #include <file.au3> #include <string.au3> #include <array.au3> GUICreate("Dell Drivers/Manuals/Warranty", 296, 110) $Driver = GUICtrlCreateCheckbox("Drivers", 23, 10) GUICtrlSetState(-1, $GUI_CHECKED) $Manual = GUICtrlCreateCheckbox("Manual", 113, 10) $Warranty = GUICtrlCreateCheckbox("Warranty", 203, 10) GUICtrlCreateLabel("Service Tag #:", 21, 44) $Input = GUICtrlCreateInput("", 120, 40, 155) GUICtrlSetState(-1, $GUI_FOCUS) $Submit = GUICtrlCreateButton("Submit", 20, 70, 70) $Exit = GUICtrlCreateButton("Cancel", 110, 70, 70) $FTag = GUICtrlCreateButton("Your Tag", 200, 70, 75) Local $aAccelKeys[1][2] = [["{ENTER}", $Submit]] GUISetAccelerators($aAccelKeys) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Exit ExitLoop Case $msg = $Submit $serv_tag = GUICtrlRead($Input) If Not IsChecked($Driver) And Not IsChecked($Manual) And Not IsChecked($Warranty) Then MsgBox(48, "Selection Error", "Pleaes make a selection first") ElseIf Not StringRegExp($serv_tag, "^([a-zA-Z0-9]{4}|[a-zA-Z0-9]{6})[a-zA-Z0-9]$") Then MsgBox(16, "Service Tag Error", "Service tag must be 5 or 7 alphanumeric characters with no spaces!") Else If IsChecked($Driver) Then _Fire($serv_tag) If IsChecked($Manual) Then _Fire2($serv_tag) If IsChecked($Warranty) Then _Fire3($serv_tag) ExitLoop EndIf Case $msg = $FTag _FindTag() EndSelect WEnd Exit 0 Func _Fire($sServiceTag) $oIE = _IECreate("http://www.dell.com/support/drivers/us/en/04/DriversHome/NeedProductSelection", 0, 1, 0) EndFunc ;==>_Fire Func _Fire2($sServiceTag) $oIE = _IECreate("http://support.dell.com/support/topics/global.aspx/support/my_systems_info/manuals?c=us&l=en&s=biz&~ck=ln&lnki=0&ServiceTag=" & $sServiceTag, 0, 1, 0) EndFunc ;==>_Fire2 Func _Fire3($sServiceTag) $oIE = _IECreate("http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&cs=555&l=en&s=biz&~ck=anavml&ServiceTag=" & $sServiceTag, 0, 1, 0) EndFunc ;==>_Fire3 Func _FindTag() Local $pid = Run("wmic csproduct list brief", @SystemDir, @SW_HIDE, $STDOUT_CHILD) ;wmic isn't an internal command to CMD ProcessWaitClose($pid) ;better than loops $output = StdoutRead($pid) $tag = StringRegExpReplace($output, "(?s)^(?:.+?v+.+?h{2,})(.+?)h{2,}.*$", "$1" & @LF) If $tag = "" Then MsgBox(16, "Access Denied", "Only the administrator group members can use WMIC.EXE" & @CR & @CR & "Reason:WIN32 Error: Access is Denied!") EndIf GUICtrlSetData($Input, $tag) EndFunc ;==>_FindTag Func IsChecked($control) Return BitAND(GUICtrlRead($control), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>IsChecked
  6. Anyone care to lend a hand with this?
  7. Thanks for the reply. Here is an example of what I mean. So the application will have a button and a textpad. When the button is clicked it will send the following text to the textpad "You press a Button" I would like to have an ini file that button one get's it's text from. So the user could go in and make it say something different. rodent1 seems to have done something like this before.
  8. Hello All, I'm about to start working on a log building script and I was thinking about using an external ini file to control settings for the application that the user can edit and have the script use the new settings. Does anyone have any examples by chance of something simple? I just need an idea to help me get started.
  9. Thanks Malkey this works great also!
  10. Thanks everyone for all of your help and very quick replies. boththose, I was able to integrate your code into my project and it works great!
  11. After thinking about it, I wouldn't be able to use this. Your example works fine, but I'm pulling this from the console window. I'm not sure how I could use @CRLF with reading from the console. Here is the code that I have to do that. Local $pid = Run("wmic csproduct list brief", @SystemDir, @SW_HIDE, $STDOUT_CHILD) ;wmic isn't an internal command to CMD ProcessWaitClose($pid) ;better than loops $output = StdoutRead($pid) ConsoleWrite($output) $array = StringSplit($output, @CRLF, 1) _ArrayDisplay($array)
  12. Sorry my reply was slow on that. Testing this now and will let you know soon :-)
  13. Thanks for the tip I'll check on that also. The only thing that will change is FFF84F1 Latitude E6420 Dell Inc. 01 Well Dell Inc, should stay but the FF84F1, Latitude E6420, and 01 will change. I built ^([a-zA-Z0-9]{4}|[a-zA-Z0-9]{6})[a-zA-Z0-9]$ off of just using FFF84F1 if that helps you any.
  14. I checked on the splitstring and I'm not sure it can help me. Do you think if I use it in an array I could call the array that it puts it in and then find it? I tested with _ArrayDisplay and got [0]|4 [1]|Caption IdentifyingNumber Name Vendor Version [2]|Computer System Product GXM84R1 Latitude E6420 Dell Inc. 01 [3]| [4]| I'm going to guess that the "|" are added from doing a copy from the ListView Display pop up that _ArrayDisplay Does
  15. Thanks, I'll check out the help file on that one.
×
×
  • Create New...