-
Posts
3,954 -
Joined
-
Days Won
38
Andreik last won the day on July 17 2024
Andreik had the most liked content!
About Andreik
- Birthday January 1
Profile Information
-
Member Title
Joker
Recent Profile Visitors
Andreik's Achievements
-
Andreik reacted to a post in a topic: LED Banners (good resolutions for the New Year)
-
Andreik reacted to a post in a topic: Keyboard GUI (Happy New Year!)
-
Andreik reacted to a post in a topic: Delete all files in a folder
-
Delete all files in a folder
Andreik replied to mustilem23's topic in AutoIt General Help and Support
It matters for the script. If it's anything else than empty string or some sort of spaces then most likely you pass to FileDelete() an invalid path. -
Delete all files in a folder
Andreik replied to mustilem23's topic in AutoIt General Help and Support
What is $_sSrcPath2? The following path already looks fine. -
Delete all files in a folder
Andreik replied to mustilem23's topic in AutoIt General Help and Support
Check in help file FileDelete(). You can use wildcards in the path like <DirPath>\*.pdf in order to delete all pdf files from a directory (replace <DirPath> with the full path to your actually directory). -
Tony4219 reacted to a post in a topic: Run as TrustedInstaller using DLL (NSudoDM.dll, NSudoAPI.dll)
-
Count down in For...Next loop?
Andreik replied to emendelson's topic in AutoIt General Help and Support
For $x = 90 To 65 Step -1 ... Next -
Tutorial AutoIT - PHP -MySQL.v2.0 - (Moved)
Andreik replied to abarba's topic in AutoIt General Help and Support
What are you talking about, how it's related to AutoIt and why did you post in this section of the forum reserved for example scripts? -
Get Mica or Mica Alt color in Windows 11
Andreik replied to electryon's topic in AutoIt General Help and Support
Global Const $DWMWA_SYSTEMBACKDROP_TYPE = 38 $tResult = DllStructCreate('int DWM_SYSTEMBACKDROP_TYPE;') $hWin = WinGetHandle('[ACTIVE]') ; Change with your window handle DllCall('Dwmapi.dll', 'long', 'DwmGetWindowAttribute', 'hwnd', $hWin, 'dword', $DWMWA_SYSTEMBACKDROP_TYPE, 'ptr', DllStructGetPtr($tResult), 'int', DllStructGetSize($tResult)) ConsoleWrite('DWM_SYSTEMBACKDROP_TYPE: ' & $tResult.DWM_SYSTEMBACKDROP_TYPE & @CRLF) Possible results: 0 - DWMSBT_AUTO 1 - DWMSBT_NONE 2 - DWMSBT_MAINWINDOW 3 - DWMSBT_TRANSIENTWINDOW 4 - DWMSBT_TABBEDWINDOW Or simply use _WinAPI_DwmGetWindowAttribute(). -
Keybanger reacted to a post in a topic: Gui not staying on top of pinned apps.
-
Dan_555 reacted to a post in a topic: Gui not staying on top of pinned apps.
-
Gui not staying on top of pinned apps.
Andreik replied to Keybanger's topic in AutoIt GUI Help and Support
If @Dan_555's solution doesn't work you can try this. -
You get the answer if you read the documentation. Use a custom GUI with an input or edit control and I think you are fine.
-
Andreik reacted to a post in a topic: BLAS/LAPACK-based Linear Algebra and nonlinear adjustment UDF
-
Andreik reacted to a post in a topic: BLAS/LAPACK-based Linear Algebra and nonlinear adjustment UDF
-
CYCho reacted to a post in a topic: zPlayer - My own little audio/video player
-
zPlayer - My own little audio/video player
Andreik replied to CYCho's topic in AutoIt Example Scripts
Maybe a mouse hook will work so you can get the info about what window is clicked from MOUSEHOOKSTRUCT structure. In order to find if it's a simple click or a double click you can use a timer and GetDoubleClickTime() function. -
JohnnyMcDollar reacted to a post in a topic: Running Microsoft Photos application with Autoit3
-
Running Microsoft Photos application with Autoit3
Andreik replied to JohnnyMcDollar's topic in AutoIt GUI Help and Support
ShellExecute('ms-photos:viewer?fileName={Your image path here}') or if your default app for certain file extension is already MS Photos you can simply use ShellExecute('{Your image path here}') PS: brackets above mark a placeholder, you don't need them -
_FileListToArray versus _FileListToArrayRec
Andreik replied to mr-es335's topic in AutoIt General Help and Support
_FileListToArrayRec() search recursively for files in subdirectories and _FileListToArray() does not. -
HTTP.Send() ERROR thrown for GET Request
Andreik replied to Aviral's topic in AutoIt General Help and Support
Same script works on different machines and you still think it's still something wrong with AutoIt but not with a specific machine or the network or a firewall or anything else, right? Also why don't you use ObjEvent() so you have at least an error code or a message as a starting point to identify the issue? -
Just use ControlFocus() and focus another control or if you want to prevent dotted focus lines then check out this thread. #include <WinAPISysWin.au3> $hGUI = GUICreate('Test') $cButton = GUICtrlCreateButton('Click Me', 100, 100, 100, 30) $hButton = GUICtrlGetHandle($cButton) $cDummy = GUICtrlCreateLabel('', 0, 0, 0, 0) GUISetState(@SW_SHOW, $hGUI) While True Switch GUIGetMsg() Case -3 ; GUI_EVENT_CLOSE Exit Case $cButton MsgBox(0, '', 'You clicked the button') EndSwitch If _WinAPI_GetFocus() = $hButton Then ControlFocus($hGUI, '', $cDummy) WEnd
-
Here is an example about what @jchd told you about having a foreign key on Category and an update example. #include <SQLite.au3> #include <Array.au3> _SQLite_Startup() $hDB = _SQLite_Open() ; Create categories and products tables _SQLite_Exec($hDB, 'CREATE TABLE categories(' & _ 'idCategory INTEGER PRIMARY KEY,' & _ 'Category VARCHAR(32) NOT NULL' & _ ');' _ ) _SQLite_Exec($hDB, 'CREATE TABLE products' & _ '(idProduct INTEGER PRIMARY KEY,' & _ 'idCategory INTEGER NOT NULL,' & _ 'ProductName VARCHAR(64) NOT NULL,' & _ 'Price DECIMAL(10, 5) NOT NULL,' & _ 'RegisterDate DATETIME NOT NULL,' & _ 'Description TEXT,' & _ 'FOREIGN KEY(idCategory) REFERENCES categories(idCategory)' & _ ');' _ ) ; Insert categories _SQLite_Exec($hDB, 'INSERT INTO categories(Category) VALUES("Book"), ("Pen"), ("Eraser");') ; Insert some products _SQLite_Exec($hDB, 'INSERT INTO products(idCategory, ProductName, Price, RegisterDate) VALUES' & _ '(1, "Book A", 55000, "2024/09/05 10:10:10"),' & _ '(1, "Book B", 35000, "2024/09/01 15:10:10"),' & _ '(1, "Book C", 75000, "2024/09/02 11:10:10"),' & _ '(1, "Book D", 15000, "2024/09/04 10:10:10"),' & _ '(2, "Pen A", 15000, "2024/09/03 15:10:10"),' & _ '(2, "Pen B", 25000, "2024/09/03 13:10:10"),' & _ '(2, "Pen C", 35000, "2024/09/04 08:10:10"),' & _ '(2, "Pen D", 20000, "2024/09/04 09:10:10"),' & _ '(3, "Eraser A", 25000, "2024/08/04 23:10:10"),' & _ '(3, "Eraser B", 25000, "2024/10/04 13:10:10"),' & _ '(3, "Eraser C", 25000, "2022/08/04 15:10:10"),' & _ '(3, "Eraser D", 25000, "2025/03/04 23:50:10")' _ ) Local $aResult, $iRows, $iColumns ; Read all products from table _SQLite_GetTable2d($hDB, 'SELECT p.idProduct, c.Category, p.ProductName, p.Price, p.RegisterDate, p.Description ' & _ 'FROM products p INNER JOIN categories c ON p.idCategory=c.idCategory;', $aResult, $iRows, $iColumns) _ArrayDisplay($aResult) ; Read all products from table ordered by date descending _SQLite_GetTable2d($hDB, 'SELECT p.idProduct, c.Category, p.ProductName, p.Price, p.RegisterDate, p.Description ' & _ 'FROM products p INNER JOIN categories c ON p.idCategory=c.idCategory ' & _ 'ORDER BY RegisterDate DESC;', $aResult, $iRows, $iColumns) _ArrayDisplay($aResult) ; Update description of the first product _SQLite_Exec($hDB, 'UPDATE products SET Description = "Whatever you want" WHERE idProduct = 1;') _SQLite_GetTable2d($hDB, 'SELECT p.idProduct, c.Category, p.ProductName, p.Price, p.RegisterDate, p.Description ' & _ 'FROM products p INNER JOIN categories c ON p.idCategory=c.idCategory;', $aResult, $iRows, $iColumns) _ArrayDisplay($aResult) _SQLite_Close($hDB) _SQLite_Shutdown()