
ray306
Active Members-
Posts
27 -
Joined
-
Last visited
ray306's Achievements

Seeker (1/7)
0
Reputation
-
_ExcelCom_UDF for LocoDarwin (possible bug)
ray306 posted a topic in AutoIt General Help and Support
Hi: It would appear that I am having a problem with getting the _ExcelCellColorSet function to set the proper RGB hex value colors in the spreadsheet. The following code should set the cell color to blue as the hex value for blue is 0x0000ff. What happens instead is that it sets the cell color to red whose hex value is 0xff0000.????? CODECase $DataArray[$innerCounter][$temp]=1 _ExcelCellColorSet($oExcel, $x, 1, $x, 1, 256, 0x0000ff) As you can see I set the $iColorIndex value to 256 to force it to use the hex values. I quickly figured out that the value needed to get the reqired colors entailed reversing the hex values from RGB to BRG. Is it supposed to work this way? I was under the impression the RGB was the standard. Thanks so much for _ExcelCom_UDF it has been invaluable to me, great library of functions. Thanks Ray -
Is it possible to make autoit do..
ray306 replied to Hyflex's topic in AutoIt General Help and Support
May want to try the following http://www.autoitscript.com/forum/index.php?showtopic=30564 Ray -
Thanks folks, Works like a charm....I clearly didn't understand the use of $ Ray306
-
Hi: I'm trying to validate a U.S. zip code in either 5digit or zip+4 format It appears to me to be accurate but it is not working. Here is the code: CODE$_zip = GUICtrlRead ($Czip ) If $_zip = "" Then;Means this is a required field $errStr = $errStr & "Zip is a Required Field"&@cr $errCount += 1 GUICtrlSetColor($CLabel7, 0xff0000) ElseIf Not (StringRegExp ( $_zip , "[0-9]{5}|([0-9]{5}[\-]{1}[0-9]{4})" ,0)) Then $errStr = $errStr & " Invalid Zip. Use Either NNNNN or NNNNN-NNNN Format"&@cr GUICtrlSetColor($Czip, 0xff0000) $errCount += 1 Endif Any ideas? Thanks Ray306
-
Hi: Does anyone now how to set up an input box to accept currency as the input. I've set one of the constraints to number which of course precludes the period (ie. $5.00) I can easily do error checking on the data but it would be so much easier to have the input accept only currency values. Any ideas Thanks Ray
-
Thanks for your input valuator Just a note( I should have included it or at least alluded to it. The Hidedata() function is responsible for not showing(hiding) the data based upon the values in the radio buttons(checked or unchecked). Your approach is valid and I can see how I can remove 1 line ofvalue checking by using it. I still experience the lag though, but only when I try to click the "Next" button. When I click the "Next" button (giving the button focus) I can then hit the "Enter" key as fastas I want; no lag. Since it would appear that the problem has something to do with how the button processes the actual click. By hitting "Enter" it would appear that the event notifier bypasses the settings on the buttonclick event notifier. I already tried lowering the threshold settings on teh mouse; just trying to understand. Thanks Ray
-
Thanks for the response This application loads a database query into a 2 dimensional array called DataArray[][] The next button that lags is to go to the next record. Here is the event handler and the subFunction it calls CODEFunc NextClick() If $placeholder < $highIndex Then;increments counter $placeholder = $placeholder + 1 Else $placeholder = 1;takes care of wrap around EndIf populate($placeholder); puts data into all the controls If GUICtrlRead ($Study) = $GUI_CHECKED And GUICtrlRead ($Hide) = $GUI_CHECKED then HideData() Endif EndFunc Func populate($a) If $highIndex <1 Then MsgBox(1,@ScriptLineNumber&"Data Error","It would appear that there is no data with which to populate the form."&@cr& _ "This normally occurs when you try to acess a Group that has no files as yet."&@cr& _ "Please check to see in an empty group has been selected.") return EndIf GUICtrlSetData ( $Name, $DataArray[$a][1]) GUICtrlSetData ( $Family, $DataArray[$a][3]) GUICtrlSetData ( $Order, $DataArray[$a][4]) GUICtrlSetData ( $Habitat, $DataArray[$a][5]) $z = StringSplit ( $DataArray[$a][7], "" ) ;MsgBox(1,@ScriptLineNumber,"Identifier"&$DataArray[$a][7]);DEBUG If $z[0] ="" or $z[0] =0 Then GUICtrlSetImage ( $Picture, "C:\NoImage.jpg" ) Else GUICtrlSetImage ( $Picture, $DataArray[$a][7]) Endif GUICtrlSetData ( $RecNum2, "Rec: "& $DataArray[$a][0]) EndFunc Thanksfor your help Ray
-
Hi all, I have a question about the evident lag I am experiencing when clicking a button on a GUI. The response time must be .5 sec or so which may not seem like a lot but if you repeatedly click a button it will miss some of the clicks. I have tried lowering the thresholds on the following: OPt(MouseClickDelay) Opt(MouseClickDownDelay) Opt(WinWaitDelay) I have also tried to lower the Sleep time in the while loop (it is in onEvent mode) I also notice that when I give the button focus(ie click on it) I can then use the enter to repeatedly hot the button and I experience virtually no lag. The response time is great. Hope someone can enlighten me Thanks Ray
-
I need to exit a set of loops based on external input
ray306 replied to ray306's topic in AutoIt General Help and Support
I have to humbly apologize. You are correct, I did not implement your suggestion properly. It works as you showed it. One other question, just trying to understand the theory here. It will work with the hot key but my stop button on the GUI itself doesn't do the same job, even when routed to the same event processing Func. Why is that? Thanks again for the help Ray -
I need to exit a set of loops based on external input
ray306 replied to ray306's topic in AutoIt General Help and Support
Thanks for the reply. I'm afraid that it does not work though. Since the GUI is in "onEvent" mode, once it is involved in processing an event(running the Func) it will not process the next event until it has completed the event it is working on. I think I need to come up with a scheme to have it reply to the events while in the function Thanks Ray -
Hi all: I need to discern a way to exit the following function based on external input. It is an application that displays pictures and the data associated with them. In automatic mode it cycles that the data but the process can take a few minutes, during that time I cannot stop the operation. I tried using exitloop with an external variable that the script checks at every iteration but ifI try to change that variable the script waits until the job it;s working on is complete. An input or help appreciated Ray CODEFunc StartClick() GUICtrlSetState ( $Start, $GUI_DISABLE ) GUICtrlSetState($Stop,$Gui_ENABLE) $placeholder = 1 Dim $index[$highIndex];gets the highest index value in the DataArray for $x in $index $index[$x] = 0 Next $dir = 0; Thisection below randomizes the sequence of pics While $placeholder <= $highIndex + 1 $val = Random(1,$highIndex);make a random number cap of the size of the highest index If $index[$val] = 0 Then $index[$val] = 1 Else While $index[$val] = 0;indicates a 1 (TRUE) value If $dir = 0 Then $val = $val +1 If $val > $highIndex Then $val = 1 Else $val = $val -1 If $val < 2 Then $val = $highIndex EndIf Wend $index[$val]=1 EndIf If $dir = 0 Then ;when randomly looking for an element has been used it looks for one that has not been used $dir =1 Else $dir = 0 EndIf if Not $DataArray[$val][7] ="C:\NoImage.jpg" then statsHide() EndIf populate($Val);writes new values Sleep($speedVal) statsShow() $placeholder = $placeholder + 1 Sleep($speedVal) Wend GUICtrlSetState ( $Start, $GUI_ENABLE ) GUICtrlSetState ( $Stop, $GUI_DISABLE ) EndFunc
-
I created an animated .gif file to use as a splash screen. When I run it as SplasOn() in autoit the automation doesn't work. Is there a restriction that won't allow this behavior or is it just me (probably the most likely answer) Thanks for any input Ray
-
How to determine size and status of an array
ray306 replied to ray306's topic in AutoIt General Help and Support
Thanks Mega Knew it was something simple. BrainfreezeI guess Thanks Ray -
I have a array variable that I use to hold the result of database query. I need to check the array before addressing it . For instance I can use isArray()to check whether it is indeed an array. If the array is empty it will still return 1(True) to the function. Normally you would check Array[0] but if the array variable is blank the function will cause a fatal error ie. subscript out of range. Any ideas on how to accomplish this? I need to know its status so I can throw an error before actually attempting to perform operations if it happens to be empty. Thanks Ray
-
It would appear that there is a problem with the function _ExcelSheetUsedRangeGet in the ExcelCom_UDF. The problem would appear to be the invoking of : $aSendBack[3] = Number(StringRegExpReplace($aSendBack[0], "\a", "")) this call is on line 2110 in the ExcelCom_UDF I have. This call is supposed to strip away the non numeric part of an Excel cell address. (ie. A51 becomes 51). It would appear that the syntax for StringRegExpReplace() may have changed in the newest version as I did not have a problem with this until I updated last evening. The code should be: $aSendBack[3] = Number(StringRegExpReplace($aSendBack[0], "[A-Z,a-z]", "")) I tested the suggested replacement code and it appears to work properly. BTW thanks to all the people that put ExcelCom_UDF together as well as all the Autoit developers, it has been very helpful. Ray