Jump to content

Pain

Active Members
  • Posts

    604
  • Joined

  • Last visited

Profile Information

  • Location
    Sweden

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Pain's Achievements

Universalist

Universalist (7/7)

1

Reputation

  1. Hi nabeeha, take a look at the PixelGetColor or PixelSearch method. https://www.autoitscript.com/autoit3/docs/functions/PixelGetColor.htm https://www.autoitscript.com/autoit3/docs/functions/PixelSearch.htm
  2. Hi nbg15, You should be able to resize your image with this script: #include <GDIPlus.au3> ; init _GDIPlus_Startup() ; get file $sFile = FileOpenDialog("Select an image (non JPG)", "", "Images (*.bmp;*.png;*.gif;*.tif)") $hImage = _GDIPlus_ImageLoadFromFile($sFile) ; size $width = _GDIPlus_ImageGetWidth($hImage) $height = _GDIPlus_ImageGetHeight($hImage) ; resize image 200% $hBitmap_Scaled = _GDIPlus_ImageResize($hImage, $width * 2, $height * 2) ; save file _GDIPlus_ImageSaveToFile($hBitmap_Scaled, @ScriptDir & "\resized.png") ; clean up _GDIPlus_ImageDispose($hImage) _GDIPlus_BitmapDispose($hBitmap_Scaled) ; done _GDIPlus_Shutdown()
  3. TrayIconHide Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds. 0 = show icon (default) 1 = hide icon
  4. @UserName _Security__LookupAccountName With WMI: Win32_Process and use GetOwner. You can find some useful code here: http://www.autoitscript.com/forum/index.php?showtopic=19284
  5. Untested, it's late, but give it a try. http://technet.microsoft.com/en-us/library/cc758292%28WS.10%29.aspx
  6. I haven't tested your code, but why creating GUI's in the loop? I were more thinking about a single GUI and create the GUICtrlCreatePic's in the loop instead.
  7. Since it will work together with another search feature (I track down people violating the TOS) where I first find an account (e.g "test1") and then want to find related accounts to that specific account there is no need to go further finding all other account relations (who follows the TOS). Since no other accounts are related to test1, with your values, it should only return test1.
  8. Thanks for your reply jchd. I'm not very familiar with cliques and connected subgraphs but with some helps from wiki I can tell you are right, connected subgraphs is what I'm looking for. http://en.wikipedia.org/wiki/Connected_component_%28graph_theory%29 http://en.wikipedia.org/wiki/Clique_%28graph_theory%29 I never really thought about using triggers and native SQLite to improve the performance. It was a huge difference between your and Yoriz code even though your used more inputs. However if both given examples would have been in native C, wouldn't Yoriz be faster, at least the insert since it doesn't update the values on every insert, but slower to get the the output data (search)? I believe your use of indexes also improves your code some. Since I have more than 10k accounts in total (if I filter them to only use active accounts I can get down to some hundreds I hope, maybe thousands) I believe there would be a huge performance hit so I'll try to do as much as I can in SQLite like you explained. I only inserts the values once but might search through it several times, therefore, if my above theory is correct, your code would be to prefer. I might make some chances to your code to better fit my needs but overall it looks great. I can't thank you and Yoriz enough for your help.
  9. Like this? MsgBox(0, "", GetLANMACAddress("$objItem.MACAddress(0)")) Func GetLANMACAddress($obj) Local $colItems = "" Local $strComputer = "localhost" Local $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") Local $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration", "WQL", 0x10 + 0x20) If IsObj($colItems) Then For $objItem In $colItems If (StringLen($objItem.IPAddress(0)) > 3) And (StringLen(Execute($obj)) > 3) Then If @IPAddress1 = $objItem.IPAddress(0) Then Return Execute($obj) If @IPAddress2 = $objItem.IPAddress(0) Then Return Execute($obj) If @IPAddress3 = $objItem.IPAddress(0) Then Return Execute($obj) If @IPAddress4 = $objItem.IPAddress(0) Then Return Execute($obj) EndIf Next Else Return "N/A" ; if you dont have IPSubnet EndIf EndFunc ;==>GetLANMACAddress Perhaps you'll like to change the name, I used the name of the working example when I modified it.
  10. They are basically copied right after each other, unless you have several threads making it "appear" as they were copied simultaneously.
  11. Create a GUI without any menus etc. with the size you want and use GUICtrlCreatePic.
  12. Opt("MustDeclareVars", 1) From the helpfile: The difference between Dim, Local and Global is the scope in which they are created: Dim = Local scope if the variable name doesn't already exist globally (in which case it reuses the global variable!) Global = Forces creation of the variable in the Global scope Local = Forces creation of the variable in the Local/Function scope No, you have to handle the errors yourself.
  13. PixelSearch and MouseMove, see the helpfile and make it yourself or you won't learn something.
  14. The original array? Since you can't "undo" the operations (ArrayDelete) you have to use a temporary array that you works with.
  15. Oh, seems like I just learned something new. I always add the defaults manually if I use a custom one.
×
×
  • Create New...