Jump to content

Help set value


Recommended Posts

-Hi all,  I want to set value to an input and press button to send it!
-I want to set value and send in this website: https://partner.support.services.microsoft.com/en-us/contact/chat/30/
Input to type message's code:
 

<textarea ng-attr-id="{{config.chatTypingBoxId}}" class="text-body vatheme-input-border ng-pristine ng-valid ng-empty ng-valid-maxlength ng-touched" role="textbox" autofocus="" ng-attr-placeholder="{{!chatWizard.inputIsDisabled ? chat.chatting.inputField : ''}}" ng-model="chatWizard.chatInputBoxText" ng-keydown="($event.keyCode == 13 &amp;&amp; !$event.shiftKey) &amp;&amp; chatWizard.chatSubmitClick($event)" ng-keypress="sendTypingIndicator()" ng-disabled="chatWizard.inputIsDisabled" aria-label="Type a message here" maxlength="1997" dir="auto" ng-focus="inputInnerFocus = true" ng-blur="inputInnerFocus = false" data-nolog="" id="chat-client-message-input-textbox" placeholder="Type a message here" aria-invalid="false"></textarea>

 -Button send's code:
+ When it has a value:
 

<span class="win-icon win-icon-Send text-title vatheme-send-action-button-color" ng-class="{'vatheme-send-action-button-color': chatWizard.chatInputBoxText, 'win-color-fg-secondary': !chatWizard.chatInputBoxText}" ng-click="chatWizard.chatSubmitClick()" ng-disabled="chatWizard.submitDisabled" role="button" aria-label="Send" tabindex="0" aria-disabled="false"></span>

+ When it hasn't any value:
 

<span class="win-icon win-icon-Send text-title win-color-fg-secondary" ng-class="{'vatheme-send-action-button-color': chatWizard.chatInputBoxText, 'win-color-fg-secondary': !chatWizard.chatInputBoxText}" ng-click="chatWizard.chatSubmitClick()" ng-disabled="chatWizard.submitDisabled" role="button" aria-label="Send" tabindex="0" aria-disabled="true" disabled="disabled"></span>

- Autoit code (I can set value to input but I can't click the button to send because it's disable)
 

#include <IE.au3>
$oMess = _IEGetObjById ($oIE, "chat-client-message-input-textbox")
_IEFormElementSetValue ($oMess, "Hello")
; How to press send button?

Cheers!

Link to comment
Share on other sites

Welcome to AutoIt and the forum!

Please wait at least 24 hours before bumping a thread.

Just out of curiosity: Why do you want to automate a chat?

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Moderators

Then post what you really want to do. Why ask for help on something you don't intend to do?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

No, because we're waiting for an answer as to why you're trying to automate a chat with Microsoft. Until you answer that question you're not going to get any help

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...