Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/17/2016 in all areas

  1. I do not see "Lawn and Garden", but I see <option value="51">Home and Garden</option> _IEFormElementOptionSelect($ie, "Home and Garden", 1, "byText") But first focusing on : Parameters $oObject Form Element Object of type "Select Option" Now look in html: <select name="cat" class="boxOk" id="cat" style="width: 250px; margin-bottom: 5px;" onchange="getSubCat();"> Finally : Local $oIE_Cat = _IEGetObjById($oIE, 'cat') _IEFormElementOptionSelect($oIE_Cat, "Home and Garden", 1, "byText")
    1 point
  2. A little simpler #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> $gui = GUICreate("test", 300, 200) $input = GUICtrlCreateInput("", 50, 50, 200, 20, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER)) GUISetState() GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $IdFrom, $iCode, $read $IdFrom = BitAnd($wParam, 0x0000FFFF) $iCode = BitShift($wParam, 16) Switch $IdFrom Case $input Switch $iCode Case $EN_UPDATE $read = GUICtrlRead($input) If not StringRegExp($read, "^\d+\.?\d*$") Then GUICtrlSetData($input, StringTrimRight($read, 1)) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc
    1 point
  3. So AutoIt is using ActiveX method click() on object $TrashCan AutoIt waiting for ActiveX object return with success or error. And this for me seams to be natural behavior of each other Develpment Environment (just my feeling not tested). What I can think is: I do not know how exactly AdLibRegister works, but for me it seams in this case AdLibRegister do not works. It is only so my thinking, not proven, and not confirmed by AutoIt DEV. To proove or negate it I'lltry to do some testing, when I come back home from my work.
    1 point
  4. I know, it seems odd, almost like it's a message box in your script. Hopefully, someone with more knowledge than us, will clear it up.
    1 point
  5. Pobably in another language interacting with the DOM, you might create another thread to deal with it. hence why you need to spawn another process. Seeing some other code, doing the same could have established that.
    1 point
  6. Ok, here is your answer, some dialogs block your script. They'll probably block any script in any language doing the same thing.
    1 point
  7. Well I see that the first three rows are always the same. You could load the images into a const array of the default images So modify the LoadGdiImageList function a bit Global $aGDIImageList = LoadGdiImageListFromFolder(@ScriptDir & "\Images\Default\", $iImageWidth, $iImageHeight, $iGuiWidth, $iGuiHeight) Func LoadGdiImageListFromFolder(Const ByRef $sFilePath, ByRef $iMaxWidth, ByRef $iMaxHeight, Const ByRef $iGuiWidth, $iGuiHeight) Local $aImageList[0] Local $iCurrentIndex = 0 Local $iRows = 0 Local $iColumns = 0 Local $aImages = _FileListToArray($sFilePath, "*.gif", $FLTA_FILES) If (@error) Then Return SetError(-1, 0, $aImageList) _ArrayDelete($aImages, 0) For $i = 0 To UBound($aImages) - 1 For $p = $i To UBound($aImages) - 1 If (Number(StringLeft($aImages[$i], StringInStr($aImages[$i], ".") - 1)) > Number(StringLeft($aImages[$p], StringInStr($aImages[$p], ".") - 1))) Then _ArraySwap($aImages, $i, $p) EndIf Next Next For $i = 0 To UBound($aImages) - 1 Local $iIndex = UBound($aImageList) ReDim $aImageList[$iIndex + 1] $aImageList[$iIndex] = _GDIPlus_ImageLoadFromFile($sFilePath & $aImages[$i]) $iImageWidth = Max(_GDIPlus_ImageGetWidth($aImageList[$iIndex]), $iMaxWidth) $iImageHeight = Max(_GDIPlus_ImageGetHeight($aImageList[$iIndex]), $iMaxHeight) Next GetTableDimensions($iRows, $iColumns, $iGuiWidth, $iGuiHeight, UBound($aImageList), $iImageWidth, $iImageHeight) Local $aImageListReturn[$iRows][$iColumns] For $iRow = 0 To UBound($aImageListReturn, $UBOUND_ROWS) - 1 For $iColumn = 0 To UBound($aImageListReturn, $UBOUND_COLUMNS) - 1 $aImageListReturn[$iRow][$iColumn] = $aImageList[$iCurrentIndex] $iCurrentIndex += 1 If ($iCurrentIndex >= UBound($aImageList)) Then For $i = $iColumn To $iColumns $aImageListReturn[$iRow][$iColumn] = $aImageList[0] Next ExitLoop 2 EndIf Next Next Return $aImageListReturn EndFunc ;==>LoadGdiImageListFromFolder Set all the default images in a folder called default. These are the first 3 rows that did not change. Now when you want to change out the last row you call the same function but with the directory you want and store the result in a temporary array (it's still a 2d array but it should have 1 row and 15 columns). Free the images in the $aGDIImageList that you're replacing (you can make the function however you want to do that, or modify the DisposeGdiImageList to something like DisposeGdiImageList(ByRef $aImageList, $iRowStart, $iRowEnd, $iColumnStart, $iColumnEnd). Finally, copy over the loaded images from the temporary array to the $aGDIImageList array. You'll have to think about if there is an image in the work area that's no longer in your table. Once you dispose the image in GDI+ it won't be able to draw it anymore. Maybe instead of working with one GDIImageList array you could work with 1 default one that's always drawn and another 27 for the other components, or a 2d GDIImageList array. Having the default images in the 0 index. Then, depending on which component to see, you draw all the images at the n index. That would solve the issue of drawing an image that was replaced by some other image, since we're not storing the index for the GDIImageList array where the image is but the address to the image in the Buffer. If that makes sense. I'd personally just load all of the possible images and just use a button to scroll left/right or up/down through the images, or buttons that will scroll to where the specific components are. It's up to you, it's your project, I can get you started but I won't do it all for you.
    1 point
  8. The UDF does not support working with images the way you need it. Get the Shapes collection and search for the item you need to add a link to it.
    1 point
  9. The reason that error occurred is because they're declared inside the for loops and will only get declared when you actually have the images loaded (or image, it only needs 1). If the images for the grid are not loaded then it never goes into the double for loop and never declares the variables needed to draw the border around the images properly.
    1 point
  10. You need to load the images properly. I named them all 0-49 Use this Example.rar Example.rar
    1 point
  11. Nice My code was done to show the concept, you also can do the same treatment with a regex $var = "aBc$eFg" $res = StringRegExpReplace($var, '[[:upper:]\W]', "{SHIFTDOWN}{$0}{SHIFTUP}") Msgbox(0,"", $res)
    1 point
  12. storme, If you comment out those lines and drag between the ListView, the hidden column in the LH ListView (the native created one) will indeed become visible. This is a "feature" of native ListViews I discovered some time back and the various data insertion functions within the UDF have a $fRetainWidth parameter to prevent the column size being reset. All that section does is look for a drag event and then reset the 0 size of the relevant column if one occurs, thus making it visible for only a very short (a few ms) period. Do come back if you need any more help in integrating the UDF into your code. M23
    1 point
  13. Trong, All fixed. You do realise there is a standard function (_FileListToArrayRec) to do recursive searches now? M23
    1 point
  14. Just a quick one, how you can add AutoIt support in Visual Studio Code. Download Visual Studio CodeDownload https://github.com/backr/Visual-Studio-Code-AutoItPut the "autoit" folder in UserName\.vscode\extensions\Restart Visual Studio CodeNow AutoIt is configured automatically for all available Visual Studio Themes:
    1 point
  15. So this could have been summarized to something simpel like this... which also failed: #AutoIt3Wrapper_Run_Au3Stripper=y #AutoIt3Wrapper_Res_SaveSource=Y Msgbox(0,"Test","Test") Just uploaded a beta for AutoIt3Wrapper v15.920.938.6 that should fix this. Thanks for reporting, Jos
    1 point
  16. 1 point
×
×
  • Create New...