
(Solved)Selecting Category and Sub-Category From Separate Drop Downs In IE
By
rm4453, in AutoIt General Help and Support
-
Similar Content
-
By nacerbaaziz
Hello my friends
Can we create a single context menu on more than one item?
For example, a context menu includes standardized options on more than one control, such as buttons or check boxes
to Create a context menu on one item am using this function
GUICtrlCreateContextMenu ($ HWND)
How to link it with more than one element please?
or if we can't do that, please give me a solution
so i tried to add an context menus to all the controls but the script will be long, for that if their are any solutions i hope to give it to me
thanks in advanced
-
By gahhon
_Metro_SplashTextScreen(1, "", $iMsg) AdlibRegister("_Metro_LoopInProgress") DirRemove($DIR_WA_FOLDER, 1) Local $iCopy = _WinAPI_ShellFileOperation($CUR_WA_FOLDER, $DIR_WA_FOLDER, $FO_COPY, BitOr($FOF_SIMPLEPROGRESS, $FOF_NOCONFIRMMKDIR)) AdlibUnRegister("_Metro_LoopInProgress") _Metro_SplashTextScree If @error Then _Metro_MsgBox(0, "", $iCopy) _FileWriteLog($LOG_INSTALLATION, "Error: " & $iCopy) Else _Metro_MsgBox(0, "", "Application is up to date!") _FileWriteLog($LOG_INSTALLATION, "Debug: Application is up to date.") EndIf According to the help file of _WinAPI_ShellFileOperation there are a lot of failure and error code. But how can I handle all of them and display corresponding error message based on the help file?
The incident is like this:
I'll lock the folder with permission, so when I execute the _WinAPI_ShellFileOperation to copy and overwrite the folder contents, it popped me an error message saying that permission issue to caused I can't access the folder and overwrite the contents.
Then I clicked Cancel button, and my AutoIT application exit immediately and it's not execute the function _Metro_MsgBox(0, "", $iCopy) to display the message.
Anyway, I did also tried the code below, the it still display "Application is up to date!"
According to the help file, 120 - Security settings denied access to the source.
If @error = 120 Then _Metro_MsgBox(0, "", $iCopy) _FileWriteLog($LOG_INSTALLATION, "Error: " & $iCopy) Else _Metro_MsgBox(0, "", "Application is up to date!") _FileWriteLog($LOG_INSTALLATION, "Debug: Application is up to date.") EndIf
-
By gahhon
I have a application that have a function is to create a shortcut to desktop, lets say is ChromePortable.lnk.
$iCreate = FileCreateShortcut($DIR_WA_FOLDER & '\GoogleChromePortable.exe', $DIR_SHORTCUT, $DIR_WA_FOLDER, '--kiosk "https://example.com/"') So the shortcut will be launch as kiosk mode and force to enter the specific website. However, the user is still able to right-click on the shortcut and modify the target value to remove the kiosk mode. What can I do to disable the user to editing the target value?
So far, I had asked and tried from SuperUser for advises Disable Shortcut Target Field
icacls "ChromePortable.lnk" /GRANT EVERYONE:RX So this will set the permission of this shortcut file to only Read & Execute only! But after I set it, the user is still can modify.
Please kindly advise.
Please note and assume that user don't have Administration account or etc, that should be only have 1 account to logon to the computer.
EDIT:
I must disable inheritance to remove all others permissions like SYSTEM, ADMINISTRATORS, etc. Then only GRANT everyone for READ & EXECUTE only.
But still the user can go to edit the permissions tho. Any advise?
-
By gahhon
The original UDF is Metro UDF v5.1
Recently, I have added new function to handle similar like SplashTextOn
Func _Metro_SplashTextScreen($Flag, $Title = "", $Text = "", $mWidth = 600, $Fontsize = 11, $ParentGUI = "") Local $msgbDPI = _HighDPICheck() Local $SplashScreen_Form $iMsg = $Text If $Flag = 1 Then If $HIGHDPI_SUPPORT Then $mWidth = Round($mWidth * $gDPI) Else $Fontsize = ($Fontsize / $Font_DPI_Ratio) EndIf Local $LabelSize = _StringSize($Text, $Fontsize, 400, 0, "Arial", $mWidth - (30 * $msgbDPI)) Local $mHeight = 120 + ($LabelSize[3] / $msgbDPI) $SplashScreen_Form = _Metro_CreateGUI($Title, $mWidth / $msgbDPI, $mHeight, -1, -1, False, $ParentGUI) GUICtrlCreateLabel(" " & $Title, 2 * $msgbDPI, 2 * $msgbDPI, $mWidth - (4 * $msgbDPI), 30 * $msgbDPI, 0x0200, 0x00100000) GUICtrlSetBkColor(-1, _AlterBrightness($GUIThemeColor, 30)) GUICtrlSetColor(-1, $FontThemeColor) _GUICtrlSetFont(-1, 11, 600, 0, "Arial", 5) $iLableID = GUICtrlCreateLabel($Text, 15 * $msgbDPI, 50 * $msgbDPI, "", $LabelSize[3], -1, 0x00100000) GUICtrlSetBkColor(-1, $GUIThemeColor) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, $Fontsize, 400, 0, "Arial", 5) GUISetState(@SW_SHOW) Return SetError(1, 0, "") ElseIf $Flag = 0 Then _Metro_GUIDelete($SplashScreen_Form) Return SetError(1, 0, "") Else Return SetError(0, "", "Error: Invalid flag value") EndIf EndFunc ;==>_Metro_SplashTextScreen Then I call it from my main application I got error display when exited. It didn't got any impact to the result, but just wondering why it show this error.
This error only appear when my main application trigger this function, but not from my test application to trigger this function.
Test application at here: Test Application
This is the function code where trigger the error.
Func _iMExit() For $i_HR = 0 To UBound($iGUI_LIST) - 1 Step +1 _Metro_GUIDelete($iGUI_LIST[$i_HR][0]) Next DllCallbackFree($m_hDll) _GDIPlus_Shutdown() EndFunc ;==>_iMExit ....... Func _Metro_GUIDelete($GUI) GUISetState(@SW_HIDE, $GUI) ;To prevent visible delay when the gui is being deleted _WinAPI_RemoveWindowSubclass($GUI, $m_pDll, 1010) GUIDelete($GUI) ;Remove from Global GUI List Local $CLEANED_GUI_LIST[0] For $i_HR = 0 To UBound($iGUI_LIST) - 1 Step +1 If $iGUI_LIST[$i_HR][0] <> $GUI Then ReDim $CLEANED_GUI_LIST[UBound($CLEANED_GUI_LIST) + 1][16] For $i_Hx = 0 To 11 Step +1 $CLEANED_GUI_LIST[UBound($CLEANED_GUI_LIST) - 1][$i_Hx] = $iGUI_LIST[$i_HR][$i_Hx] Next EndIf Next $iGUI_LIST = $CLEANED_GUI_LIST ;~ _ReduceMemory() EndFunc ;==>_Metro_GUIDelete Any idea what is going on?
Because before this, I also got create another input function just for password purpose. (Duplicate & similar to _Metro_InputBox)
But it didn't got any error display on console when exited.
-
By gahhon
Global $iLableID Func _Metro_SplashTextScreen($Flag, $Title = "", $Text = "", $mWidth = 600, $Fontsize = 11, $ParentGUI = "") Local $msgbDPI = _HighDPICheck() Local $SplashScreen_Form If $Flag = 1 Then If $HIGHDPI_SUPPORT Then $mWidth = Round($mWidth * $gDPI) Else $Fontsize = ($Fontsize / $Font_DPI_Ratio) EndIf Local $LabelSize = _StringSize($Text, $Fontsize, 400, 0, "Arial", $mWidth - (30 * $msgbDPI)) Local $mHeight = 120 + ($LabelSize[3] / $msgbDPI) $SplashScreen_Form = _Metro_CreateGUI($Title, $mWidth / $msgbDPI, $mHeight, -1, -1, False, $ParentGUI) GUICtrlCreateLabel(" " & $Title, 2 * $msgbDPI, 2 * $msgbDPI, $mWidth - (4 * $msgbDPI), 30 * $msgbDPI, 0x0200, 0x00100000) GUICtrlSetBkColor(-1, _AlterBrightness($GUIThemeColor, 30)) GUICtrlSetColor(-1, $FontThemeColor) _GUICtrlSetFont(-1, 11, 600, 0, "Arial", 5) $iLableID = GUICtrlCreateLabel($Text, 15 * $msgbDPI, 50 * $msgbDPI, $LabelSize[2], $LabelSize[3], -1, 0x00100000) GUICtrlSetBkColor(-1, $GUIThemeColor) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, $Fontsize, 400, 0, "Arial", 5) GUISetState(@SW_SHOW) Sleep(500) Return 1 ElseIf $Flag = 0 Then GUIDelete($SplashScreen_Form) Return 1 Else Return SetError(0, "", "Error: Invalid flag value") EndIf EndFunc ;==>_Metro_SplashTextScreen Func _Metro_SetSplashText($newMessage) If $newMessage <> "" Then GUICtrlSetData($iLableID, $newMessage) Sleep(500) EndIf EndFunc ;==>_Metro_SetSplashText #include "MetroGUI-UDF\MetroGUI_UDF.au3" $sMessage = "Copying" _Metro_SplashTextScreen(1, "", $sMessage) For $i = 1 To 10 $sMessage = $sMessage & "." _Metro_SetSplashText($sMessage) Next _Metro_SplashTextScreen(0) I don't know why it keep stuck on showing "Copying" without updating. Any idea?
Expected result: update the Copying by adding dots/second, without flickering.
Please kindly advise.
-