Announcement

Collapse
No announcement yet.

Save a text into the clipbard from a form with the B.NET Clipboard.SetDataObjec

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Save a text into the clipbard from a form with the B.NET Clipboard.SetDataObjec

    Hello,
    In my future RRGoogleMapsTools plugin , i need to save a text (latitude, longitude) from a window
    when i click on a google maps point .
    So, i have tried firstly to add a clipboard option into my html file by that don't run .
    Secondly, i have tried the VB.NET Clipboard.SetDataObjec function as:
    Code:
    Clipboard.SetDataObject(frm.tag, True)
    But that return me the RR screen name 'RRGoogleMapsTools.skin'
    Attached Files

  • #2
    course it will, thats the contents of "frm.tag" its just a string
    -Thanks
    Mitch
    www.rush2112.net

    "Did you test it in carwings??"

    Sun, Come shine my way
    May healing waters bury all my pain
    Wind, Carry me home
    The fabric of reality is tearing apart
    The piece of me that died
    Will return To live again

    Comment


    • #3
      Originally posted by mitchjs View Post
      course it will, thats the contents of "frm.tag" its just a string
      That don't help me mitchjs !
      I have found a solution on the web !
      Code:
                  Case "gmaps_setclipboard"
                      SendKeysToApplication(vbNullString, "GmapsApiForm", "^c")
                      'Get the data stored in the clipboard
                      Dim iData As IDataObject = Clipboard.GetDataObject()
                      'Check to see if the data is in a text format
                      If iData.GetDataPresent(DataFormats.Text) Then
                          'If it's text, then paste it into the textbox
                          CMD = "SETVAR;RRGoogleMapsToolsInfo;A gps coordinate is saved .<crlf>You can use the 'Point To '" & SDK.GetInfo("gmaps_gpsname") & "command ...||menu;RRGoogleMapsTools_info.skin"
                      Else
                          'If it's not text, print a warning message
                          CMD = "SETVAR;RRGoogleMapsToolsInfo;Please, select the Gps coordinates before<crlf>to use this function ...||menu;RRGoogleMapsTools_info.skin"
                      End If
                      gps = Split(CType(iData.GetData(DataFormats.Text), String), ",")
                      CMD = "SETVAR;GPSLATCLIP;" & CStr(Math.Round(Val(gps(0)), 6)) & "||SETVAR;GPSLONCLIP;" & CStr(Math.Round(Val(gps(1)), 6)) & "||SETVAR;ADDRESSCLIP;" & getGoogleMapsReverseGeocode(CStr(Math.Round(Val(gps(0)), 6)), CStr(Math.Round(Val(gps(1)), 6)))
                      Clipboard.Clear()
                      ProcessCommand = 3
      The red line does a CTRL C on the selected line and the blue line give me the result !
      Another way for get the clipboard value is 'My.Computer.Clipboard.GetText()' .

      Comment


      • #4
        messy if you ask me...

        your going to drive me crazy with all your SETVARS!!!

        use... SDK.SetUserVar("varname", value)
        its instant, and less work for RR
        -Thanks
        Mitch
        www.rush2112.net

        "Did you test it in carwings??"

        Sun, Come shine my way
        May healing waters bury all my pain
        Wind, Carry me home
        The fabric of reality is tearing apart
        The piece of me that died
        Will return To live again

        Comment


        • #5
          Originally posted by mitchjs View Post
          messy if you ask me...

          your going to drive me crazy with all your SETVARS!!!

          use... SDK.SetUserVar("varname", value)
          its instant, and less work for RR
          In the majority case, i use the SDK.SetUserVar command ! But infact, here i had forgotten that !! oops

          Comment

          Working...
          X