
Crazyace
Active Members-
Posts
54 -
Joined
-
Last visited
Everything posted by Crazyace
-
Opps, I was doing that for testing before. Going to change it.
-
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.
-
_IECreate hidden IE Window in IE9 fails
Crazyace replied to Crazyace's topic in AutoItX Help and Support
I found out that it's that damn UAC that's causing an issue here. -
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?
-
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
-
Anyone care to lend a hand with this?
-
External INI file to Control Script Settings
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
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. -
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.
-
StringRegExp - Need Help Creating
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
Thanks Malkey this works great also! -
StringRegExp - Need Help Creating
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
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! -
StringRegExp - Need Help Creating
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
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) -
StringRegExp - Need Help Creating
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
Sorry my reply was slow on that. Testing this now and will let you know soon :-) -
StringRegExp - Need Help Creating
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
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. -
StringRegExp - Need Help Creating
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
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 -
StringRegExp - Need Help Creating
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
Thanks, I'll check out the help file on that one. -
Hello, I would like to take the info below and StringRegExp out the FFF84F1. If I have just FFF84F1 I can use ^([a-zA-Z0-9]{4}|[a-zA-Z0-9]{6})[a-zA-Z0-9]$ and find it just fine. But with all the other letters, whitespace and multiline I'm not able to make my first code work. I'm not very strong in RegEx and if someone could help me out that would be great. (I added a "." at the end to help show the extra white space after it.) Caption IdentifyingNumber Name Vendor Version Computer System Product FFF84F1 Latitude E6420 Dell Inc. 01 .
-
Copy text from Console Window
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
No problem, but thank you ever so much for the help! -
Copy text from Console Window
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
Thanks for the follow up. So what I would like to do next is use StringRegExp($line, "^([a-zA-Z0-9]{4}|[a-zA-Z0-9]{6})[a-zA-Z0-9]$") and then have that set the input box. I tried a few different things but it wasn't happy lol -
Copy text from Console Window
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
Here is my complete code for my small app #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\faviconBX.ico #AutoIt3Wrapper_Res_Comment=Beta #AutoIt3Wrapper_Res_Fileversion=2.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.0 #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstants.au3> #include <IE.au3> #include <Constants.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() Opt("WinTitleMatchMode", 2) $CMD = Run(@ComSpec & " /c wmic csproduct list brief", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $line = StdoutRead($CMD) If @error Then ExitLoop MsgBox(0, "STDOUT read:", $line) WEnd EndFunc ;==>_FindTag Func IsChecked($control) Return BitAND(GUICtrlRead($control), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>IsChecked Here is the code part for the Console Window Func _FindTag() Opt("WinTitleMatchMode", 2) $CMD = Run(@ComSpec & " /c wmic csproduct list brief", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $line = StdoutRead($CMD) If @error Then ExitLoop MsgBox(0, "STDOUT read:", $line) WEnd EndFunc ;==>_FindTag When running it will pop up a blank box and then pop up a 2nd box after clicking ok that has the info from the command. Why does it do that? -
Copy text from Console Window
Crazyace replied to Crazyace's topic in AutoIt General Help and Support
Yes that would be correct. I'll test with the code and let you know. I'll also post back my complete code as well. -
Is it possible to copy text from a Console window with AutoIT? If so were would be the first place to start with the coding of that?
-
_IECreate hidden IE Window in IE9 fails
Crazyace replied to Crazyace's topic in AutoItX Help and Support
Posting info from my desktop that the code works fine on. >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:UsersJeffDesktopNew AutoIt v3 Script.au3" /UserParams +>14:03:15 Starting AutoIt3Wrapper v.2.1.0.8 Environment(Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (1.54.22.0) from:C:Program Files (x86)AutoIt3 +>14:03:15 AU3Check ended.rc:0 >Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3.exe "C:UsersJeffDesktopNew AutoIt v3 Script.au3" +>14:03:21 AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 6.999 -
_IECreate hidden IE Window in IE9 fails
Crazyace replied to Crazyace's topic in AutoItX Help and Support
I just tried AutoIT beta and 1/2 of it works. When I launch the code it starts 3 iexplore.exe processes and shows the webpage. I changed the code to: #include <IE.au3> $oIE = _IECreate("www.google.com", 0, 0) Sleep(5000) _IEQuit($oIE) I noticed that the _IEQuit never kills the process. If I close the process via task manager when I open IE I get - "Your last browsing session closed unexpectedly" -
_IECreate hidden IE Window in IE9 fails
Crazyace replied to Crazyace's topic in AutoItX Help and Support
I just reinstalled AutoIT and installed the full version of SciTE. I tried to run the file again and it still fails. >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:Usersjeff_tincherDesktopAU3 AutoSweettest.au3" /UserParams +>13:43:39 Starting AutoIt3Wrapper v.2.1.0.8 Environment(Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X86) >Running AU3Check (1.54.22.0) from:C:Program FilesAutoIt3 +>13:43:39 AU3Check ended.rc:0 >Running:(3.3.8.1):C:Program FilesAutoIt3autoit3.exe "C:Usersjeff_tincherDesktopAU3 AutoSweettest.au3" C:\Program Files\AutoIt3\Include\IE.au3 (560) : ==> The requested action with this object has failed.: WEnd WEnd^ ERROR ->13:43:39 AutoIT3.exe ended.rc:1 >Exit code: 1 Time: 1.576 -
_IECreate hidden IE Window in IE9 fails
Crazyace replied to Crazyace's topic in AutoItX Help and Support
I haven't tried Beta, but I did reinstall AutoIT on my desktop system and it works fine with IE9. I'm going to see if reinstalling on my laptop will resolve the issue for me.