Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007
    Posts
    452

    Dialog.Input Help Please

    Code:
    link = Dialog.Input("WEB", "LINK:", "", MB_ICONQUESTION);	
    if (link ~= "CANCEL") then
    	tblSelected = Input.GetSelection("Input1") 
    	if tblSelected then
    		nPos = tblSelected.Start - 1
    		sLinkText = String.Mid(Input.GetText("Input1"), tblSelected.Start, tblSelected.End - tblSelected.Start + 1)
    	else
    		nPos = GetCaretPos("Input1")
    		sLinkText = link
    	end
    	if nPos == 0 then
    		Input.SetText("Input1", "{URL=\""..link.."\"]"..sLinkText.."{/URL]"..Input.GetText("Input1"))
    	elseif nPos == String.Length(Input.GetText("Input1")) then
    		Input.SetText("Input1",Input.GetText("Input1").. "{URL=\""..sLinkText.."\"]"..link.."{/URL]")
    	else
    		sBefore = String.Left(Input.GetText("Input1"), nPos)
    		if tblSelected then
    			sAfter = String.Mid(Input.GetText("Input1"), tblSelected.End + 1, -1)
    		else
    			sAfter = String.Mid(Input.GetText("Input1"), nPos + 1, -1)
    		end
    		Input.SetText("Input1", sBefore.."{URL=\""..link.."\"]"..sLinkText.."{/URL]"..sAfter)
    	end
    end
    how can i 1 more dialog input for link text... i dont want to add same text with the link... so first dialog input will b link and the second dialog input will b link text...

  2. #2
    Join Date
    Mar 2007
    Posts
    452
    Code:
    link = Dialog.Input("WEB", "LINK:", "", MB_ICONQUESTION);
    text = Dialog.Input("LINK",	"TEXT:", "", MB_ICONQUESTION);
    if (link ~= "CANCEL") then
    	tblSelected = Input.GetSelection("Input1") 
    	if tblSelected then
    		nPos = tblSelected.Start - 1
    		sLinkText = String.Mid(Input.GetText("Input1"), tblSelected.Start, tblSelected.End - tblSelected.Start + 1)
    	else
    		nPos = GetCaretPos("Input1")
    		sLinkText = text
    	end
    	if nPos == 0 then
    		Input.SetText("Input1", "{URL=\""..link.."\"]"..sLinkText.."{/URL]"..Input.GetText("Input1"))
    	elseif nPos == String.Length(Input.GetText("Input1")) then
    		Input.SetText("Input1",Input.GetText("Input1").. "{URL=\""..sLinkText.."\"]"..link.."{/URL]")
    	else
    		sBefore = String.Left(Input.GetText("Input1"), nPos)
    		if tblSelected then
    			sAfter = String.Mid(Input.GetText("Input1"), tblSelected.End + 1, -1)
    		else
    			sAfter = String.Mid(Input.GetText("Input1"), nPos + 1, -1)
    		end
    		Input.SetText("Input1", sBefore.."{URL=\""..link.."\"]"..sLinkText.."{/URL]"..sAfter)
    	end
    end
    well i managed it

Similar Threads

  1. Dialog.Input box help
    By bobbie in forum AutoPlay Media Studio 6.0
    Replies: 8
    Last Post: 12-06-2006, 01:28 PM
  2. Multi-line Dialog.Input?
    By Gabis in forum AutoPlay Media Studio 6.0
    Replies: 5
    Last Post: 02-16-2006, 02:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts