
iriash
Members-
Posts
16 -
Joined
-
Last visited
Everything posted by iriash
-
hello community, I wanted to ask you if you know any udf that allows me to include icons in both menu and submenu using autoit functions like $menu = GUICtrlCreateMenu ("Menu") $menu_item = GUICtrlCreateMenuItem("item 1", $menu) I found an interesting function that allowed me to add icons in bmp format but only for the main menu, it does not work for the submenus because I am quite new to developing with AutoIT The function I use to add to the main menus is this: Func AddImageToMenu($ParentMenu, $IndexType, $MenuIndex, $BitmapMenu) $hBmpMenu = DllCall("user32.dll", "hwnd", "LoadImage", "hwnd", 0, _ "str", $BitmapMenu, _ "int", $IMAGE_BITMAP, _ "int", 0, _ "int", 0, _ "int", BitOR($LR_LOADFROMFILE, $LR_LOADMAP3DCOLORS)) $hBmpMenu = $hBmpMenu[0] DllCall("user32.dll", "int", "SetMenuItemBitmaps", "hwnd", GUICtrlGetHandle($ParentMenu), _ "int", $MenuIndex, _ "int", $IndexType, _ "hwnd", $hBmpMenu, _ "hwnd", $hBmpMenu) EndFunc It works very well but this function uses functions that I still don't quite understand how they work but I tried it and it works correctly. What I need is that if it is possible that this same function can be modified so that it also allows adding icons in the submenus of a main menu thanks and best regards
-
hi i am trying and i have been watching autoit technical forum. I would like to know how the percentage of a progress bar could be calculated while installing a third party application that I have on a server. The idea is from a client computer when clicking on a button that the application is installed (be careful, the application installs well and I have controlled that the progress bar grows for the duration of the process, but what does not occur to me or I do not know It is how the percentage of that program could be controlled, I have seen things that use such as dirgetsize ()) but I cannot see the solution well, is there a simple way and that the progress bar grows as the unattended installation is performed from a third party app? Thanks
-
Launch /Get-WimInfo /Wimfile - (Moved)
iriash replied to iriash's topic in AutoIt General Help and Support
Not if it is not the problem of programming it, it is that I do not see the way to execute it directly in powershell to test if it works ... that is the problem -
Hi, how i can to launch shellexecutewait() to run command /Get-WimInfo /WimFile:\\host_ip\network_unc? Any Idea? Thankx
-
Function and Syntax _winnet_addconnection2 () - (Moved)
iriash replied to iriash's topic in AutoIt General Help and Support
I already detected the problem, being the computer in domain and wanting to connect to the shared resource it does not allow me to do it by fqdn, in the $ server variable I had to change the name by the ip address and then it does connect me and this is because it does not allow me make multiple connections (I tried to do it in console and it threw me that error and change for the ip and it worked) -
Function and Syntax _winnet_addconnection2 () - (Moved)
iriash replied to iriash's topic in AutoIt General Help and Support
The comma is set, I suppose you answered before I modified the post, and it doesn't work for me, it always returns false -
$server = "my_server" $shared_resource = "my_share_resource$" $User = "User" $password = "my_password" $path_unc = "\\" & $server & "\" & $shared_resource _WinNet_AddConnection2 ("", $path_unc, $user, $password, 1) But it does not connect me, I put an msgbox to see the result of winnet ... and it always returns False, I think it is because of the syntax, what am I doing wrong? Thanks
-
hi, thanks for replying, I've already seen those threads but isn't there a simpler way to be able to add an icon to the menu?
-
Hello community, I have been using autoit for a short time but I am looking for a simple way to add icons to a standard menu but I can not find information about it. #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 437, 192, 124) $MenuItem1 = GUICtrlCreateMenu("Menu") $MenuItem2 = GUICtrlCreateMenuItem("submenu", $MenuItem1) GUICtrlSetImage($MenuItem2,"shell32.dll",4) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Guictrlsetimage()-->> Not working, Any idea? Thank you
-
Difference between #include and # include-once
iriash replied to iriash's topic in AutoIt General Help and Support
-
Difference between #include and # include-once
iriash replied to iriash's topic in AutoIt General Help and Support
A ver, soy nuevo en AutoIT y lo que hacía era crear distintos scripts y cada scripts lo compilaba y desde mi script principal solo sabia ejecutar los demas scripts usando la funcion Run() pero despues aprendi que se podian llamar los demas scripts con #require-once y ahí es donde empece a ver errores -
Difference between #include and # include-once
iriash replied to iriash's topic in AutoIt General Help and Support
Let's see everything worked well for me when I had each script separately and compiling an executable by script and called them from "my first script" with the Run function because I did not know how the scripts were included in a nested way, so when I changed it, my first script I paste my main script here #RequireAdmin #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiMenu.au3> #include <StringConstants.au3> #include <MsgBoxConstants.au3> #include <GuiStatusBar.au3> #include <GUIConstants.au3> #include <WinAPIIcons.au3> #include <GuiButton.au3> #include <WinAPIRes.au3> #include <GuiIPAddress.au3> #include-once #include <autocad.au3> #include <presto.au3> #include <cype.au3> #include <buscar_equipo.au3> #include <buscar_equipo_ip.au3> #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=\\wdsserver\cau_autoit$\img\iconocau.ico #AutoIt3Wrapper_Outfile_x64=..\aplicaciones.exe #AutoIt3Wrapper_Res_Comment=Herramientas C.A.U. #AutoIt3Wrapper_Res_Description=Instalador Versión 1.0 #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_ProductName=Aplicaciones C.A.U. #AutoIt3Wrapper_Res_ProductVersion=1.0 #AutoIt3Wrapper_Res_CompanyName=Diputación de Cáceres #AutoIt3Wrapper_Res_LegalCopyright=Alejandro Pastor Martín #AutoIt3Wrapper_Res_Language=1034 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;frm_principal() Func frm_principal() #Region Local $frm_principal=GUICreate("Aplicaciones C.A.U.", 600, 250, -1, -1,BitOR($GUI_SS_DEFAULT_GUI,$DS_MODALFRAME)) GUISetCursor (2) GUISetBkColor(0xef6847) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) ;######################################MENU C.A.U.######################################## Local $menu = GUICtrlCreateMenu("Archivo") Local $menu_aplicaciones_tecnicas = GUICtrlCreateMenu("Aplicaciones técnicas") Local $menu_autocad = GUICtrlCreateMenuItem("Autocad",$menu_aplicaciones_tecnicas) Local $menu_cype = GUICtrlCreateMenuItem("Cype",$menu_aplicaciones_tecnicas) Local $menu_presto = GUICtrlCreateMenuItem("Presto",$menu_aplicaciones_tecnicas) Local $menu_salir = GUICtrlCreateMenuItem("Salir",$menu) Local $menu_herramientas = GUICtrlCreateMenu("Herramientas") Local $menu_ItemHerramientas_buscarequipo = GUICtrlCreateMenuItem("Buscar equipo por Nombre",$menu_herramientas) Local $menu_ItemHerramientas_buscarequipo_ip = GUICtrlCreateMenuItem("Buscar equipo por dirección IP",$menu_herramientas) ;######################################################################################## ;#################################FUNCIONES MOSTRAR IMAGENES EN FORMULARIO PRINCIPAL############ GUICtrlCreatePic("\\wdsserver\cau_autoit$\img\frm_principal\rueda_frm_principal.bmp", 0, 100, 75, 76) GUICtrlCreatePic("\\wdsserver\cau_autoit$\img\frm_principal\encabezado_frm_principal.jpg", 0, 1, 600, 150) ;############################################################################################## GUISetState(@SW_SHOW) #EndRegion ;#################################COMPORTAMIENTO FORMULARIO PRINCIPAL######################## While 1 ;Local $user = DllOpen("user32.dll") $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE, $menu_salir ;GUIDelete($frm_principal) ExitLoop Case $menu_salir ;GUIDelete($frm_principal) ExitLoop ;Case $msg = $menu_presto ;GUIDelete($frm_principal) ;frm_presto() ;ExitLoop ;Case $msg = $menu_cype ;GuiDelete($frm_principal) ;frm_cype() ;ExitLoop ;Case $msg = $menu_autocad ;GuiDelete($frm_principal) ;frm_autocad() ;ExitLoop ;Case $msg = $menu_ItemHerramientas_buscarequipo ;GUIDelete($frm_principal) ;buscar_equipo() ;ExitLoop ;Case $msg = $menu_ItemHerramientas_buscarequipo_ip ;GUIDelete($frm_principal) ;buscar_por_ip() ;ExitLoop EndSwitch WEnd EndFunc -
Difference between #include and # include-once
iriash replied to iriash's topic in AutoIt General Help and Support
-
Difference between #include and # include-once
iriash replied to iriash's topic in AutoIt General Help and Support
>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "\\wdsserver\cau_autoit$\scripts\aplicaciones.au3" /UserParams +>12:10:27 Starting AutoIt3Wrapper (19.1127.1402.0} from:SciTE.exe (4.2.0.0) Keyboard:0000040A OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0C0A) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:\\wdsserver\cau_autoit$\scripts\aplicaciones.au3 +>12:10:27 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "\\wdsserver\cau_autoit$\scripts\aplicaciones.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. +>12:10:27 AutoIt3.exe ended.rc:0 +>12:10:27 AutoIt3Wrapper Finished. >Exit code: 0 Time: 1.498 -
Hello, I have several .au3 files and in the main script <aplicaciones.au3> I have the following set Main Script <aplicaciones.au3> #RequireAdmin #include <_____.au3> ... #include-once #include <autocad.au3> #include <cype.au3> ... each script is called by the name of the included scripts function Script ---->> autocad.au3 and there i have... #include <______.au3> for this script #include-once #include <aplicaciones.au3> (for call main script with function) Would it be the correct way to do it? I also get errors like AutoItWrapper / run / prod / ErrorStdOut in \ applications.au3 / UserParams but I have no idea how to fix this. The problem has started to happen to me when in the while loop I have changed that instead of executing each script independently as if it were an executable to become include files and I am not very clear how I should do it for it to work correctly. I need help to be clear about this please, thank you very much