Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/07/2020 in all areas

  1. Guys, Don't worry, all of the above was already know when we approved the post, but we will indeed only ban accounts when a violation is made. Let's just go back to the topic at hand and just report when you see something wrong. Jos
    3 points
  2. Now we see your true motivation. Just ImagineIt. EasyCodeIt for sure ..... look at all the trouble argumentum and seadoggie01 had. Anyway bud, ignore me while I wait for the easy bits .... and keep up the good work ... good to see you are now gaining in the polls.
    2 points
  3. Still pushing hard for that name change, huh?
    2 points
  4. ..a good brain for moderation you have, young @TheSaint
    2 points
  5. @TheDcoder - Both avikdhupar (who I quoted) and bakdlpzptk (who you quoted) would appear to be spammers .... even though they both registered long ago. There certainly aren't many posts by them in all that time, so they are indeed suspicious to my mind. I wouldn't be surprised if they were both the same person. avikdhupar did two posts here about MacOS, which I see now have been removed. Too much of a coincidence to my mind for another similar post to have then later appeared by bakdlpzptk.
    2 points
  6. UEZ

    GDI + Zooming?

    Here an example code which you can analyze. There are more ways to zoom an image, this is one of them: #include <GDIPlus.au3> #include <GUIConstantsEx.au3> Global $sImage = FileOpenDialog("Select an image", "", "Images (*.jpg;*.png;*.bmp;*.gif;*.tif)") If @error Then Exit MsgBox(16, "Error", "No file selected!", 10) Global $fZoom = 2.5 _GDIPlus_Startup() Global $hImage = _GDIPlus_ImageLoadFromFile($sImage) Global $aDim = _GDIPlus_ImageGetDimension($hImage) Global $hGUI = GUICreate("GDI+ Image Zoom", $aDim[0], $aDim[1]) GUISetState() Global $hCanvas = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsSetInterpolationMode($hCanvas, $GDIP_INTERPOLATIONMODE_NearestNeighbor) _GDIPlus_GraphicsDrawImageRectRect($hCanvas, $hImage, 0, 0, $aDim[0], $aDim[1], _ ($aDim[0] - $aDim[0] * $fZoom) / 2, ($aDim[1] - $aDim[1] * $fZoom) / 2, _ $aDim[0] * $fZoom, $aDim[1] * $fZoom) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GDIPlus_GraphicsDispose($hCanvas) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() It will zoom the image by factor 2.5 and center the display.
    2 points
  7. Ok thanks for the info it works good now, Let's see what you can do to error message is therefore misleading. but you are a very good programmer.
    1 point
  8. Gawd bud, I already explained all that. But lets do as Jos says. And I won't mention anything more about your imaginary fan(s).
    1 point
  9. UEZ

    GDI + Zooming?

    This is an old script which I coded a while ago. #include <GUIConstantsEx.au3> #include <Misc.au3> #include <Screencapture.au3> #include <WindowsConstants.au3> Global $sx, $z = 10, $sy, $mc2, $f, $scroll_x, $scroll_y Global Const $gdip_x = 0, $gdip_y = 0, $zmin = 5, $zmax = 15, $bg_c = "404040" Global Const $gdip_w = 800, $gdip_h = 600 Global $bW = $gdip_w, $bH = $gdip_h Global Const $hGUI = GUICreate("GDI+ Test", $gdip_w, $gdip_h) GUISetState() Global Const $dll = DllOpen("user32.dll") _GDIPlus_Startup() Global Const $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global Const $hBuffer_Bmp = _GDIPlus_BitmapCreateFromGraphics($gdip_w, $gdip_h, $hGraphic) Global Const $hContext = _GDIPlus_ImageGetGraphicsContext($hBuffer_Bmp) _GDIPlus_GraphicsSetPixelOffsetMode($hContext, 2) ;~ _GDIPlus_GraphicsSetCompositingQuality($hContext, 2) _GDIPlus_GraphicsSetInterpolationMode($hContext, 5) Global $hMatrix = _GDIPlus_MatrixCreate() _GDIPlus_MatrixTranslate($hMatrix, $gdip_w / 2, $gdip_h / 2) Global Const $hHBitmap = _ScreenCapture_Capture("", 0, 0, $gdip_w, $gdip_h) Global Const $hBmp = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmap) Draw2Graphic($hBmp) Zoom(2) GUIRegisterMsg($WM_MOUSEWHEEL, "_Mousewheel") Do $mc2 = MouseGetPos() While _IsPressed("01", $dll) $mc3 = MouseGetPos() If $mc2[0] <> $mc3[0] Or $mc2[1] <> $mc3[1] Then $scroll_x = ($sx + ($mc3[0] - $mc2[0]) / ($z ^ 2 / 32)) $scroll_y = ($sy + ($mc3[1] - $mc2[1]) / ($z ^ 2 / 32)) Draw2Graphic($hBmp) Zoom(2) EndIf Sleep(10) WEnd $sx = $scroll_x $sy = $scroll_y Until GUIGetMsg() = $GUI_EVENT_CLOSE _GDIPlus_MatrixDispose($hMatrix) _WinAPI_DeleteObject($hHBitmap) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_GraphicsDispose($hContext) _GDIPlus_BitmapDispose($hBuffer_Bmp) _GDIPlus_BitmapDispose($hBmp) _GDIPlus_Shutdown() GUIDelete() DllClose($dll) Exit Func Draw2Graphic($hImage) Local $w, $h _GDIPlus_GraphicsClear($hContext, "0xFF" & $bg_c) If $bW <= $gdip_w And $bH <= $gdip_h Then $f = 1 _GDIPlus_GraphicsDrawImageRect($hContext, $hImage, $gdip_w / 2 - $bW / 2 - $scroll_x, $gdip_h / 2 - $bH / 2 - $scroll_y, $bW, $bH) Else If $bW >= $bH Then $f = $bW / $gdip_w Else $f = $bH / $gdip_h EndIf $w = Floor($bW / $f) $h = Floor($bH / $f) If $w > $gdip_w Then $f = $bW / $gdip_w ElseIf $h > $gdip_h Then $f = $bH / $gdip_h EndIf _GDIPlus_GraphicsDrawImageRect($hContext, $hImage, $gdip_w / 2 - $w / 2 - $scroll_x, $gdip_h / 2 - $h / 2 - $scroll_y, $w, $h) EndIf EndFunc ;==>Draw2Graphic Func Zoom($zoom_dir) Switch $zoom_dir Case -1 _GDIPlus_MatrixDispose($hMatrix) $hMatrix = _GDIPlus_MatrixCreate() _GDIPlus_MatrixTranslate($hMatrix, $gdip_w / 2, $gdip_h / 2) _GDIPlus_MatrixScale($hMatrix, 1 / $f, 1 / $f) $scroll_x = 0 $scroll_y = 0 Case 0 If $z > $zmin Then _GDIPlus_MatrixScale($hMatrix, 0.95, 0.95) $z -= 0.05 EndIf Case 1 If $z <= $zmax Then _GDIPlus_MatrixScale($hMatrix, 1.05, 1.05) $z += 0.05 EndIf Case 2 _GDIPlus_MatrixScale($hMatrix, 1, 1) EndSwitch _GDIPlus_GraphicsSetTransform($hContext, $hMatrix) _GDIPlus_GraphicsClear($hContext, "0xFF" & $bg_c) ;~ _GDIPlus_GraphicsDrawImage($hContext, $hBmp, -$bW / 2 + $scroll_x, -$bH / 2 + $scroll_y) _GDIPlus_GraphicsDrawImageRect($hContext, $hBmp, -$bW / 2 + $scroll_x, -$bH / 2 + $scroll_y, $gdip_w, $gdip_h) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBuffer_Bmp, $gdip_x, $gdip_y, $gdip_w, $gdip_h) EndFunc ;==>Zoom Func _Mousewheel($hWnd, $iMsg, $wParam, $lParam) Switch $wParam Case 0xFF880000 ;mouse wheel up Zoom(0) Return 0 Case 0x00780000 Zoom(1) Return 0 EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>_Mousewheel Zoom with mouse wheel, move picture around by pressing the lmb and moving mouse.
    1 point
  10. For auto updating the results i use this: #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> Local $idListview, $searchtext, $y, $z, $tmp GUICreate("ListView Get Item Text", 400, 350) $idListview = GUICtrlCreateListView("", 2, 2, 194, 268) $idListview1 = GUICtrlCreateListView("", 202, 2, 194, 268) $inputbox = GUICtrlCreateInput("", 2, 280, 200, 20) ;$button = GUICtrlCreateButton("Search", 212, 280, 50, 20) GUISetState(@SW_SHOW) ; Add columns _GUICtrlListView_AddColumn($idListview, "Items", 100) _GUICtrlListView_AddColumn($idListview, "Desc", 100) _GUICtrlListView_AddColumn($idListview1, "Copy", 100) _GUICtrlListView_AddColumn($idListview1, "Desc", 100) Local $array[] = ["Music", "Video", "Audio"] Local $drray[] = ["abc", "def", "ghi", "jkl", " "] Local $FolderCheck, $SrchValueCmp = '' For $x = 0 To 50 _GUICtrlListView_AddItem($idListview, "Item " & $x & " " & $array[Random(0, 3)]) _GUICtrlListView_AddSubItem($idListview, $x, $drray[Random(0, 3)] & $drray[Random(0, 4)] & $drray[Random(0, 3)], 1) Next ; Loop until the user exits. While 1 $SrchValue = GUICtrlRead($inputbox) If $SrchValue <> $SrchValueCmp Then $SrchValueCmp = $SrchValue If StringLen($SrchValue) > 3 Then SearchList($SrchValue) EndIf EndIf ;============================================================================= $nmsg = GUIGetMsg() If $nmsg = $GUI_EVENT_CLOSE Then ExitLoop WEnd ;============================================================================= Func SearchList($FindText) _GUICtrlListView_DeleteAllItems($idListview1) $Files = _GUICtrlListView_GetItemCount($idListview) For $k = 1 To $Files $STRResult = StringInStr(_GUICtrlListView_GetItemText($idListview, $k - 1, 0)&_GUICtrlListView_GetItemText($idListview, $k - 1, 1), $FindText, 0) If $STRResult <> 0 Then $RandomColor = "0x" & StringRight(Hex(Random(150, 255, 1)), 2) & StringRight(Hex(Random(150, 255, 1)), 2) & StringRight(Hex(Random(150, 255, 1)), 2) GUICtrlCreateListViewItem(_GUICtrlListView_GetItemText($idListview, $k - 1, 0) & '|' & _GUICtrlListView_GetItemText($idListview, $k - 1, 1), $idListview1) GUICtrlSetBkColor(_GUICtrlListView_GetItemParam($idListview1, _GUICtrlListView_GetItemCount($idListview1) - 1), $RandomColor) EndIf Next EndFunc ;==>SearchList ;============================================================================= only updates when the input is bigger than 3 characters.
    1 point
  11. Good news - it works. I installed the 1.6.4.2 version of WinHttp of your stated wiki, specified the location of my chromedriver (C: ..) and found another pain point which had to be fixed in advance. While I was figuring out how to get the code running my company has updated the chrome version. Luckily the chromedriver for 83.0.4103.39 works fine with 83.0.4103.97 too so that the following script works fine for me. Just opening Chrome, navigating to Google, opening a new tab with yahoo on it and focussing back at Google again. #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession _WD_Option("Driver", "C:\Program Files (x86)\AutoIt3\chromedriver.exe") _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}}' _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "http://google.com") _WD_NewTab($sSession) _WD_Navigate($sSession, "http://yahoo.com") ConsoleWrite("URL=" & _WD_Action($sSession, 'url') & @CRLF) _WD_Attach($sSession, "google.com", "URL") I'll try to apply it to my initial problem with Salesforce and if I need help I am going to hit the forum up again.
    1 point
  12. When a spammer makes an account, it only gets removed if discovered. I am guessing you did not look at their post count and wonder why so few in all that time. Not to mention the amazing coincidence of two members who have barely ever posted in all that time, being motivated to post in this topic around the same time ... it being a hugely popular topic to be drawn to and all. Then there are those who create multiple accounts. bakdlpzptk and avikdhupar are quite similar nonsense seeming names too ... the kind that might be created by a bot. P.S. Some spam is obvious, others not. The removed spam post, was just a link seemingly related to there not being any MacOS binaries. Even a normal seeming post can be spam if it wasn't posted for a genuine reason (genuine reason not being the same as genuine sounding). bakdlpzptk joined in 2008 and the only post they have made in all that time is here ... can you really ImagineIt was genuine?
    1 point
  13. Yup, the poster posted spam afterwards. Hmm... okay, I'll see what I can do with that tonight... I've never compiled anything from source before, that's cool!
    1 point
  14. The pre-built binary that I uploaded cannot be run on RPi as it uses a different processor architecture (ARM). So you will have to compile the code yourself, you just need a C compiler and CMake, then you are on your way to compiling the code. Here are some simple commands that should get you started: $ git clone https://github.com/DcodingTheWeb/EasyCodeIt.git $ cd EasyCodeIt $ mkdir build && cd build $ cmake .. $ make I don't see the post that you quoted, has it been removed? Mac is currently not a target because I don't have any Apple devices, I have never used them in my life. That being said, it should be easy enough to compile the current version for MacOS, and in the future it might be easy enough to have a separate MacOS fork maintained by 3rd-party developers with mac experience. I also welcome hardware donations
    1 point
  15. A couple of things... 1. You're getting the return value of ControlSetText, but you aren't checking if it's True or False... that'll let you know if you're finding the window and control or not. 2. You're using a lot of Send commands. Send directs the input to the active window, so if anything else pops up, your script will fail. At the very least, replace the Send("{ENTER}") with ControlClick("Save As", "", "[CLASS:Button; INSTANCE:2]") to click save (verify this is correct on your computer) instead of sending enter. 3. It looks like your timeout is 15 minutes... that's a bit long unless it's a huge file. 4. Usually if you input a file path like "C:\Users\Documents\file_202007060122", the Save As dialog will add an extension for you of the expected type. You might need to do a FileFindFirstFile search to get your result if you don't know the extension before you try to download it. 5. Welcome to forums! See if you can try the above and get it to work, but post back and let us know how it goes
    1 point
  16. I have changed image of topic and i have added some tips to understand: https://www.autoitscript.com/forum/topic/203289-combine-two-arrays-respectively/
    0 points
×
×
  • Create New...