Nareshm

Help for Create Autoit Msgbox ?

8 posts in this topic

#1 ·  Posted

I have autoit script like this :

winActivate ("BillReceipt")
ControlClick ( "BillReceipt", "", "[NAME:winviewer]", "right")
Send ( "{ENTER}")
WinWait ("Print")
ControlClick ("Print", "", "[CLASS:Button; INSTANCE:13]")
Winwait ("Save As")
WinActivate ("Save As")
Send ("{TAB 5} {Backspace} ^v {Enter}")

I need Saved successfully msgbox with file name as i saved like Filename.extension (Example = test.pdf is saved successfull)

Please Help

Share this post


Link to post
Share on other sites



#2 ·  Posted

use msgbox in "if statement", check help file for more info...

if True then 
MsgBox<0,"","Successfully Saved")
else
MsgBox<0,"","Error")
Endif

 


ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites

#3 ·  Posted

39 minutes ago, 232showtime said:

use msgbox in "if statement", check help file for more info...

if True then 
MsgBox<0,"","Successfully Saved")
else
MsgBox<0,"","Error")
Endif

@232showtime
I need msgbox like this : test.pdf  is saved successful
 

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

3 hours ago, Nareshm said:

I need msgbox like this : test.pdf  is saved successful

So what is your problem changing it to your needs?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

:lmao: =]]

Local $iFileName = "test.pdf"
; Some code here

If (True) Then ; Replace TRUE to your expression!
    MsgBox(Null, "MyApp", $iFileName & " is saved successful !")
Else
    MsgBox(Null, "MyApp", $iFileName & " is saved Error !")
EndIf

sorry spam!

Edited by VIP
PS

Regards,
 

Share this post


Link to post
Share on other sites

#6 ·  Posted

14 hours ago, VIP said:

:lmao: =]]

Local $iFileName = "test.pdf"
; Some code here

If (True) Then ; Replace TRUE to your expression!
    MsgBox(Null, "MyApp", $iFileName & " is saved successful !")
Else
    MsgBox(Null, "MyApp", $iFileName & " is saved Error !")
EndIf

sorry spam!

@VIP
Every time my file name is changed/Variable file name/Everytime i want to save file with different name

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

@Nareshm is it just me, or your answers really sound like you are expecting that someone will write you exact script you need so that you dont need to try to make it yourself based on examples?

Edited by kosamja

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

2 hours ago, Nareshm said:

Every time my file name is changed/Variable file name/Everytime i want to save file with different name

@Nareshm,

Ignoring me totally will not help and I will still impose a restriction on your account when you refuse to show some effort and keep on begging for code.
So consider this the last warning.

@everybody else, I do not need to be assisted in telling people to get their act together. ;)

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • Verssuss
      By Verssuss
      hi guys i want avoid to multiple MsgBox by hold Hotkey "]" in my script
       
      #include <GuiConstantsEx.au3> #include <Windowsconstants.au3> #include <SendMessage.au3> #include <WinAPI.au3> ;~ HotKeySet("{[}", "_boxminus") HotKeySet("{]}", "_boxplus") HotKeySet("{ESC}", "On_Exit") $hGUI = GUICreate("", 100, 100, -1, -1, $WS_POPUP, BitOr($WS_EX_LAYERED, $WS_EX_COMPOSITED, $WS_EX_TOPMOST)) GUISetBkColor(0x00FF00) GuiCtrlCreateLabel("", 3, 3, 94, 94) GUICtrlSetBkColor(-1, 0xABCDEF) GUICtrlSetResizing(-1, $GUI_DOCKBORDERS) GUISetState() _WinAPI_SetLayeredWindowAttributes($hGui, 0xABCDEF) $box_range = 100 While 1 $pos = MouseGetPos() WinMove($hGUI, "", $pos[0] - ($box_range / 2), $pos[1] - ($box_range / 2), $box_range, $box_range) WEnd ;~ Func _boxminus() ;~ If $box_range >= 30 Then $box_range = $box_range - 10 ;~ If $box_range < 30 Then $box_range = $box_range - 1 ;~ EndFunc Func _boxplus() If $box_range < 200 Then $box_range = $box_range + 10 Else MsgBox(0,"ERROR", "Maximum size already exist") EndIf EndFunc Func On_Exit() Exit EndFunc i wish after i get first MsgBox another gonna replaced with first one or just cancel in and apeear again
      how can i make it right ???
    • AnonymousX
      By AnonymousX
      Hello,
      I'm trying to make it so that when a message box pops up that the GUI will be unresponsive until that message box has been closed. From reading through the help the closest thing I can find is the WinWaitClose function, however this doesn't work fully as desired. If user tries to click on GUI the actions are more just waiting for the message box to close, so that once it closes everything happens at once. I want it so that the GUI is completely unusable until message box is closed. 
       
      Below is test code to demonstrate the problem and help explain what I want. Any advice on this?
       
      #include <GUIConstantsEx.au3> Example() Func Example() ; Create a GUI with various controls. Local $hGUI = GUICreate("Example") Local $idOK = GUICtrlCreateButton("OK", 310, 370, 85, 25) local $but = GUICtrlCreateButton("Hello", 150,150,85,25) ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) MsgBox( 262144,"Message","Try hitting the hello button several times,without closing this window. Now close this window and see how script wasn't restricted it just was waiting and storing the instructions") WinWaitClose("Message") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idOK Exit case $but MsgBox(0,"","Hello") EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($hGUI) EndFunc ;==>Example  
    • hcI
      By hcI
      Hello !
      I'm making a little script with only a tray option, no GUI.
      And i would like to know if someone created a function to set a personalized icon in top-left corner of the MsgBox and/or InputBox...
      -hcI
    • SkysLastChance
      By SkysLastChance
      I am a little confused and not sure what I am doing wrong.
      I am trying to get a OK and Cancel button that is always on top. 
      $MB_OKCANCEL 1 OK and Cancel $MB_TOPMOST 262144 MsgBox() has top-most attribute set  
      But when I try to run this code. 
      $Msg = MsgBox(1 & 262144, "Registration", "Would you like to continue?") I get this.

    • Tigerweld
      By Tigerweld
      I have a simple msgbox function that I need to use in multiple places, but have different outcomes.  For example, in one location if the left button was pressed I need it to write a one of the reg values.  How do I accomplish this?
       
      #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Local $reg0 = RegWrite("HKLM\SOFTWARE\Wow6432Node\Newton\Default\Servers", "WRKSTN_ID", "REG_DWORD", "0") Local $reg1 = RegWrite("HKLM\SOFTWARE\Wow6432Node\Newton\Default\Servers", "WRKSTN_ID", "REG_DWORD", "1") Local $reg2 = RegWrite("HKLM\SOFTWARE\Wow6432Node\Newton\Default\Servers", "WRKSTN_ID", "REG_DWORD", "2") Local $reg3 = RegWrite("HKLM\SOFTWARE\Wow6432Node\Newton\Default\Servers", "WRKSTN_ID", "REG_DWORD", "3") Local $reg4 = RegWrite("HKLM\SOFTWARE\Wow6432Node\Newton\Default\Servers", "WRKSTN_ID", "REG_DWORD", "4") MainGUI() Func MainGUI() Local $Left, $Right, $msg GUICreate("Light") Opt("GUICoordMode", 2) $Left = GUICtrlCreateButton("Left", 10, 30, 50) $Right = GUICtrlCreateButton("Right", 0, -1) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Left ; write reg value Case $msg = $Right ; write reg value EndSelect WEnd EndFunc