$(function () { pageContext.i18n.modTalk = 'moderation talk'; pageContext.i18n.replyToComment = 'Reply'; pageContext.i18n.modTalkEmpty = 'moderation talk is empty'; pageContext.url.getModTalk = "/comments/%25ID%25/listModTalk.json"; pageContext.url.possibleCommentRecipients = "/comments/%ID%/possibleRecipients.json"; pageContext.url.commentEdit = '/comments/%25ID%25/edit.html'; pageContext.url.commentView = '/comments/%ID%/view.html'; pageContext.i18n.commentVisibility = { 'full': 'Viewable by all users', 'op': 'Viewable by the original poster', 'mod': 'Viewable by moderators', 'opAndMod': 'Viewable by moderators and the original poster', 'other': 'Advanced visibility', 'dialogTitle': 'Comment visibility', 'selectGroups': 'Visible to groups', 'selectOther': 'Other recipients', 'selectOriginalPoster': 'Original poster', 'selectModerators': 'Moderators', 'selectAssignees': 'Asked to answer users' }; pageContext.i18n.commentMenuLabels = { 'comment-edit': 'comments.menu.edit', 'comment-delete': 'comments.menu.delete', 'comment-convert': 'comments.menu.convert' };pageContext.i18n.answer= { bestAnswer: 'Best Answer', controlBar : { accept: 'Accept', unaccept: 'Unaccept', acceptCommand: 'Accept this answer as correct', cancelAcceptedCommand: 'Remove this answers accepted status' } }; window.croles = { u: false, op: false, m: false, og: false, as: false, ag: false, dc: false, doc: false, eo: false, ea: false }; tools.init({ q: { e: false, ew: false, eo: false, r: false, ro: false, d: false, dow: false, fv: false, c: false, co: false, p: false, tm: false , ms: false, mos: false }, n: { f: false, vf: false, vfo: false, vr: true, vro: true, c: false, co: false, vu: false, vd: false, w: false, wo: false, l: false }, c: { e: false, eo: false, d: false, dow: false, ta: false, tao: false, l: false }, a: { e: false, ew: false, eo: false, d: false, dow: false, a: false, aoq: false, ao: false, tc: false, tco: false, p: false, tm: false }, pc: croles }, { tc: true, nsc: true }); commandUtils.initializeLabels(); }); Skip to Content
avatar image
Former Member

Pop-up identification

Good day,

I have 2 pop-up windows that can appear when my script is running. Each pop-up needs to be handled differently.

#1 session.findById("wnd[1]/usr/txtMESSTXT1").text

#2 session.findById("wnd[1]/usr/.txtSPOP-TEXTLINE1).text

Is there a code to identify which pop-up has appeared so that if pop-up #2 appears instead of #1, the script won't debug?

I have tried an if statement that identifies the pop-up based on the text within the box but that has failed dismally.😔

Please assist

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 26, 2015 at 11:04 AM

    Hello Chimane,

    welcome in the Scripting Language forum.

    Has your pop-up window a title? If so, you can differentiate the pop-up windows on this point.

    If session.findbyid("wnd[1]").Text = "Title Pop-Up Window 1" Then

      'Do something

    ElseIf session.findbyid("wnd[1]").Text = "Title Pop-Up Window 2" Then

      'Do something other

    End If

    Are there other differences between the pop-up windows, e.g. buttons, labels? It is also possible to differentiate it on this points.

    Let us know your results.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Stefan,

      It worked perfectly 😀, I used the title of the pop-up as per your code.Thanks for the prompt response.